From 07a4dd2476d672e07243e87210bf90533c604eb4 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Fri, 29 Sep 2023 22:02:33 -0700 Subject: [PATCH] Bugfix GP XML config: always include portal Ever since 8e7efd51f, the GlobalProtect *portal* has been included in the newly-written XML config (``) only if the portal config XML contained a `` tag. We should include the portal even if it doesn't have a name for itself. Signed-off-by: Daniel Lenski --- auth-globalprotect.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/auth-globalprotect.c b/auth-globalprotect.c index 4bf25144..c9c232af 100644 --- a/auth-globalprotect.c +++ b/auth-globalprotect.c @@ -534,14 +534,12 @@ no_gateways: if (vpninfo->write_new_config) { buf = buf_alloc(); buf_append(buf, "\n \n"); - if (portal) { - buf_append(buf, " "); - buf_append_xmlescaped(buf, portal ? : _("unknown")); - buf_append(buf, "%s", vpninfo->hostname); - if (vpninfo->port!=443) - buf_append(buf, ":%d", vpninfo->port); - buf_append(buf, "/global-protect\n"); - } + buf_append(buf, " "); + buf_append_xmlescaped(buf, portal ? : _("unknown")); + buf_append(buf, "%s", vpninfo->hostname); + if (vpninfo->port!=443) + buf_append(buf, ":%d", vpninfo->port); + buf_append(buf, "/global-protect\n"); } /* first, count the number of gateways */ -- 2.50.1