From 36695f84028a8be6ecb90e67a8af9c50e67c7129 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Fri, 12 Jan 2018 18:18:06 -0800 Subject: [PATCH] properly handle alternate GPST tunnel path Signed-off-by: Daniel Lenski Signed-off-by: David Woodhouse --- gpst.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gpst.c b/gpst.c index 306d6794..6ce4ef1c 100644 --- a/gpst.c +++ b/gpst.c @@ -447,6 +447,11 @@ static int gpst_parse_config_xml(struct openconnect_info *vpninfo, xmlNode *xml_ else if (!xmlnode_get_text(xml_node, "mtu", &s)) { vpninfo->ip_info.mtu = atoi(s); free(s); + } else if (!xmlnode_get_text(xml_node, "ssl-tunnel-url", &s)) { + free(vpninfo->urlpath); + vpninfo->urlpath = s; + if (strcmp(s, "/ssl-tunnel-connect.sslvpn")) + vpn_progress(vpninfo, PRG_INFO, _("Non-standard SSL tunnel path: %s\n"), s); } else if (!xmlnode_get_text(xml_node, "timeout", &s)) { int sec = atoi(s); vpn_progress(vpninfo, PRG_INFO, _("Tunnel timeout (rekey interval) is %d minutes.\n"), sec/60); @@ -626,7 +631,7 @@ static int gpst_connect(struct openconnect_info *vpninfo) return ret; reqbuf = buf_alloc(); - buf_append(reqbuf, "GET /ssl-tunnel-connect.sslvpn?"); + buf_append(reqbuf, "GET %s?", vpninfo->urlpath); filter_opts(reqbuf, vpninfo->cookie, "user,authcookie", 1); buf_append(reqbuf, " HTTP/1.1\r\n\r\n"); -- 2.49.0