Skip to content
Permalink
Browse files
Make --disable-ipv6 really do it
Previously, it only made us stop *asking* the server for IPv6. If the server
gave us IPv6 addresses anyway on the basis that this is the 21st century and
there's no excuse for pretending otherwise (or, in practice, because my test
server is handing out hard-coded responses without looking at the request),
we were still actually using them.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jun 11, 2012
1 parent 57b1ca9 commit ad922ae9f76d85293bd9f2277ce3b867ef49a93d
Showing with 8 additions and 6 deletions.
  1. +8 −6 cstp.c
14 cstp.c
@@ -356,14 +356,16 @@ static int start_cstp_connection(struct openconnect_info *vpninfo)
if (mtu > vpninfo->mtu)
vpninfo->mtu = mtu;
} else if (!strcmp(buf + 7, "Address")) {
if (strchr(new_option->value, ':'))
vpninfo->vpn_addr6 = new_option->value;
else
if (strchr(new_option->value, ':')) {
if (!vpninfo->disable_ipv6)
vpninfo->vpn_addr6 = new_option->value;
} else
vpninfo->vpn_addr = new_option->value;
} else if (!strcmp(buf + 7, "Netmask")) {
if (strchr(new_option->value, ':'))
vpninfo->vpn_netmask6 = new_option->value;
else
if (strchr(new_option->value, ':')) {
if (!vpninfo->disable_ipv6)
vpninfo->vpn_netmask6 = new_option->value;
} else
vpninfo->vpn_netmask = new_option->value;
} else if (!strcmp(buf + 7, "DNS")) {
int j;

0 comments on commit ad922ae

Please sign in to comment.