goto out;
}
vpn_progress(vpninfo, PRG_INFO, _("Got IPv6 address %s\n"), a);
- new_ip_info.netmask6 = add_option_steal(&new_opts, "ipaddr6", &a);
+ if (!vpninfo->disable_ipv6)
+ new_ip_info.netmask6 = add_option_steal(&new_opts, "ipaddr6", &a);
+ free(a);
} else {
vpn_progress(vpninfo, PRG_INFO, _("Got IPv6 address %s\n"), s);
- new_ip_info.addr6 = add_option_steal(&new_opts, "ipaddr6", &s);
+ if (!vpninfo->disable_ipv6)
+ new_ip_info.addr6 = add_option_steal(&new_opts, "ipaddr6", &s);
}
} else if (xmlnode_is_named(x, "dns")) {
if (!xmlnode_get_prop(x, "domain", &s) && s && *s) {
* FortiOS 4 was the last version to send the legacy HTTP configuration.
* FortiOS 5 and later send the current XML configuration.
* We clearly do not need to support FortiOS 4 anymore.
- *
+ *
* Yet we keep this code around in order to get a sanity check about
* whether the SVPNCOOKIE is still valid/alive, until we are sure we've
* worked out the weirdness with reconnects.
_("Failed to handle IPv6 address\n"));
return -EINVAL;
}
- new_ip_info->addr6 = add_option_dup(new_opts, "ip6addr", buf, -1);
-
- i = strlen(buf);
- snprintf(buf + i, sizeof(buf) - i, "/%d", data[16]);
- new_ip_info->netmask6 = add_option_dup(new_opts, "ip6netmask", buf, -1);
+ if (!vpninfo->disable_ipv6) {
+ new_ip_info->addr6 = add_option_dup(new_opts, "ip6addr", buf, -1);
+ i = strlen(buf);
+ snprintf(buf + i, sizeof(buf) - i, "/%d", data[16]);
+ new_ip_info->netmask6 = add_option_dup(new_opts, "ip6netmask", buf, -1);
+ }
vpn_progress(vpninfo, PRG_DEBUG, _("Received internal IPv6 address %s\n"), buf);
break;