Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 ad922ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cstp.c
Expand Up @@ -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, ':'))
if (strchr(new_option->value, ':')) {
if (!vpninfo->disable_ipv6)
vpninfo->vpn_addr6 = new_option->value;
else
} else
vpninfo->vpn_addr = new_option->value;
} else if (!strcmp(buf + 7, "Netmask")) {
if (strchr(new_option->value, ':'))
if (strchr(new_option->value, ':')) {
if (!vpninfo->disable_ipv6)
vpninfo->vpn_netmask6 = new_option->value;
else
} else
vpninfo->vpn_netmask = new_option->value;
} else if (!strcmp(buf + 7, "DNS")) {
int j;
Expand Down

0 comments on commit ad922ae

Please sign in to comment.