]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
GP: ask user to report unexpected value of <connected-gw-ip>
authorDaniel Lenski <dlenski@gmail.com>
Sun, 15 Nov 2020 23:32:08 +0000 (15:32 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Tue, 17 Nov 2020 20:04:33 +0000 (12:04 -0800)
We don't know what this one means, but it seems likely that we need to do
some special processing if this differs from the VPN server's external IP
address.

See https://gitlab.com/openconnect/openconnect/-/issues/193#note_447466255
for an example of this field observed "in the wild".

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
gpst.c

diff --git a/gpst.c b/gpst.c
index 686bde2baf8fe23f0e9aa5ec6c609b978de852b9..b35f6fe531a807dbcf4e03efe78de59c885dfea9 100644 (file)
--- a/gpst.c
+++ b/gpst.c
@@ -511,6 +511,12 @@ static int gpst_parse_config_xml(struct openconnect_info *vpninfo, xmlNode *xml_
                                vpn_progress(vpninfo, PRG_DEBUG,
                                                         _("Gateway address in config XML (%s) differs from external gateway address (%s).\n"), s, vpninfo->ip_info.gateway_addr);
                        vpninfo->esp_magic = inet_addr(s);
+               } else if (!xmlnode_get_val(xml_node, "connected-gw-ip", &s)) {
+                       if (strcmp(s, vpninfo->ip_info.gateway_addr))
+                               vpn_progress(vpninfo, PRG_DEBUG, _("Config XML <connected-gw-ip> address (%s) differs from external\n"
+                                                                  "gateway address (%s). Please report any this to\n"
+                                                                  "<openconnect-devel@lists.infradead.org>, including any problems\n"
+                                                                  "with ESP or other apparent loss of connectivity or performance.\n"), s, vpninfo->ip_info.gateway_addr);
                } else if (xmlnode_is_named(xml_node, "dns")) {
                        for (ii=0, member = xml_node->children; member && ii<3; member=member->next)
                                if (!xmlnode_get_val(member, "member", &s))