Skip to content

Commit

Permalink
Enable IPv6
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Nov 2, 2009
1 parent 1eb9308 commit 153c0b4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
5 changes: 2 additions & 3 deletions cstp.c
Expand Up @@ -109,9 +109,8 @@ static int start_cstp_connection(struct openconnect_info *vpninfo)
if (vpninfo->deflate)
openconnect_SSL_printf(vpninfo->https_ssl, "X-CSTP-Accept-Encoding: deflate;q=1.0\r\n");
openconnect_SSL_printf(vpninfo->https_ssl, "X-CSTP-MTU: %d\r\n", vpninfo->mtu);
/* To enable IPv6, send 'IPv6,IPv4'.
We don't know how most of that works yet though. */
openconnect_SSL_printf(vpninfo->https_ssl, "X-CSTP-Address-Type: IPv4\r\n");
openconnect_SSL_printf(vpninfo->https_ssl, "X-CSTP-Address-Type: %s\r\n",
vpninfo->disable_ipv6?"IPv4":"IPv6,IPv4");
openconnect_SSL_printf(vpninfo->https_ssl, "X-DTLS-Master-Secret: ");
for (i = 0; i < sizeof(vpninfo->dtls_secret); i++)
openconnect_SSL_printf(vpninfo->https_ssl, "%02X", vpninfo->dtls_secret[i]);
Expand Down
5 changes: 5 additions & 0 deletions main.c
Expand Up @@ -87,6 +87,7 @@ static struct option long_options[] = {
{"key-password-from-fsid", 0, 0, 0x02},
{"useragent", 1, 0, 0x03},
{"setuid-csd", 1, 0, 0x04},
{"disable-ipv6", 0, 0, 0x05},
{NULL, 0, 0, 0},
};

Expand Down Expand Up @@ -123,6 +124,7 @@ void usage(void)
printf(" --cookieonly Fetch webvpn cookie only; don't connect\n");
printf(" --printcookie Print webvpn cookie before connecting\n");
printf(" --cafile=FILE Cert file for server verification\n");
printf(" --disable-ipv6 Do not ask for IPv6 connectivity\n");
printf(" --dtls-ciphers=LIST OpenSSL ciphers to support for DTLS\n");
printf(" --no-dtls Disable DTLS\n");
printf(" --no-passwd Disable password/SecurID authentication\n");
Expand Down Expand Up @@ -333,6 +335,9 @@ int main(int argc, char **argv)
vpninfo->uid_csd_given = 1;
break;
}
case 0x05:
vpninfo->disable_ipv6 = 1;
break;
case 'Q':
vpninfo->max_qlen = atol(optarg);
if (!vpninfo->max_qlen) {
Expand Down
14 changes: 9 additions & 5 deletions openconnect.8
Expand Up @@ -114,6 +114,9 @@ openconnect \- Connect to Cisco AnyConnect VPN
.I FILE
]
[
.B --disable-ipv6
]
[
.B --dtls-ciphers
.I LIST
]
Expand Down Expand Up @@ -267,6 +270,9 @@ Print webvpn cookie before connecting
.B --cafile=FILE
Cert file for server verification
.TP
.B --disable-ipv6
Do not advertise IPv6 capability to server
.TP
.B --dtls-ciphers=LIST
Set OpenSSL ciphers to support for DTLS
.TP
Expand Down Expand Up @@ -294,11 +300,9 @@ Use STRING as 'User-Agent:' field value in HTTP header.
.SH LIMITATIONS
The
.B openconnect
client does not yet support IPv6 connectivity, although it is known
that Cisco's servers do. We have not yet found a suitably configured
server against which we can test IPv6 functionality. Please contact
the author if you are able to configure such a server so that we can
test IPv6 support against it.
client is not thoroughly tested with IPv6 connectivity. Please contact
the author if you are able to access a server with IPv6 enabled, so
that we can test IPv6 support against it.

.SH AUTHORS
David Woodhouse <dwmw2@infradead.org>
1 change: 1 addition & 0 deletions openconnect.h
Expand Up @@ -180,6 +180,7 @@ struct openconnect_info {
z_stream deflate_strm;
uint32_t deflate_adler32;

int disable_ipv6;
int reconnect_timeout;
int reconnect_interval;
int dtls_attempt_period;
Expand Down

0 comments on commit 153c0b4

Please sign in to comment.