]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Warn if <quarantine> is set in GlobalProtect XML config
authorDaniel Lenski <dlenski@gmail.com>
Wed, 21 Apr 2021 04:34:22 +0000 (21:34 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 21 Apr 2021 17:52:58 +0000 (10:52 -0700)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
gpst.c

diff --git a/gpst.c b/gpst.c
index 290547491166f2bddd982f38becfb84d2727dee2..39b6daa36def4e481953c207b84e70022a861361 100644 (file)
--- a/gpst.c
+++ b/gpst.c
@@ -383,6 +383,10 @@ static int gpst_parse_config_xml(struct openconnect_info *vpninfo, xmlNode *xml_
                        vpninfo->ip_info.mtu = atoi(s);
                else if (!xmlnode_get_val(xml_node, "lifetime", &s))
                        vpninfo->auth_expiration = time(NULL) + atol(s);
+               else if (!xmlnode_get_val(xml_node, "quarantine", &s) && strcmp(s, "no"))
+                       vpn_progress(vpninfo, PRG_DEBUG,
+                                    _("WARNING: Config XML contains <quarantine> tag with value of \"%s\".\n"
+                                      "    VPN connectivity may be disabled or limited.\n"), s);
                else if (!xmlnode_get_val(xml_node, "disconnect-on-idle", &s)) {
                        int sec = atoi(s);
                        vpn_progress(vpninfo, PRG_INFO, _("Idle timeout is %d minutes.\n"), sec/60);