Commit ad922ae9 authored by David Woodhouse's avatar David Woodhouse

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: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 57b1ca9c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment