]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Update CSTP for IPv6 DNS servers
authorColin Petrie <colin@spakka.net>
Thu, 27 Jun 2019 16:24:51 +0000 (18:24 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 27 Jun 2019 19:37:26 +0000 (20:37 +0100)
When the Cisco side is configured with IPv4 and IPv6 DNS resolver IPs,
it will send option X-CSTP-DNS-IP6
This patch captures the IPv6 addresses provided, and puts them in
INTERNAL_IP6_DNS variable for vpnc-scripts (which is already handled
there)

Signed-off-by: Colin Petrie <colin@spakka.net>
[dwmw2: Put them in $INTERNAL_IP4_DNS instead. They shouldn't be split.]
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
cstp.c

diff --git a/cstp.c b/cstp.c
index f59facc67ba9284d4572c2c668fb330d4ff00947..577805e05711cdb2fa02699bf0460d8e6bf282b8 100644 (file)
--- a/cstp.c
+++ b/cstp.c
@@ -534,7 +534,8 @@ static int start_cstp_connection(struct openconnect_info *vpninfo)
                                        vpninfo->ip_info.netmask6 = new_option->value;
                        } else
                                vpninfo->ip_info.netmask = new_option->value;
-               } else if (!strcmp(buf + 7, "DNS")) {
+               } else if (!strcmp(buf + 7, "DNS") ||
+                          !strcmp(buf + 7, "DNS-IP6")) {
                        int j;
                        for (j = 0; j < 3; j++) {
                                if (!vpninfo->ip_info.dns[j]) {