Skip to content

Commit

Permalink
Don't fetch legacy Fortinet config
Browse files Browse the repository at this point in the history
It really doesn't seem to make any difference.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
dwmw2 committed Apr 27, 2021
1 parent 47fd809 commit c0ca8c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fortinet.c
Expand Up @@ -531,6 +531,7 @@ static int fortinet_configure(struct openconnect_info *vpninfo)
* It's fetching the legacy non-XML configuration, isn't it?
* Do we *actually* have to do this, before fetching the XML config?
*/
#if 0 /* Nah... */
free(vpninfo->urlpath);
vpninfo->urlpath = strdup("remote/fortisslvpn");
ret = do_https_request(vpninfo, "GET", NULL, NULL, &res_buf, 0);
Expand All @@ -550,6 +551,7 @@ static int fortinet_configure(struct openconnect_info *vpninfo)
/* We don't care what it returned as long as it was successful */
free(res_buf);
res_buf = NULL;
#endif
free(vpninfo->urlpath);

/* Now fetch the connection options in XML format */
Expand All @@ -560,8 +562,10 @@ static int fortinet_configure(struct openconnect_info *vpninfo)
vpn_progress(vpninfo, PRG_ERR,
_("Server doesn't support XML config format. Ancient HTML format is not currently implemented.\n"));
goto out;
} else if (ret == 0)
goto invalid_cookie;
} else if (ret == 0) {
ret = -EPERM;
goto out;
}

ret = parse_fortinet_xml_config(vpninfo, res_buf, ret);
if (ret)
Expand Down

0 comments on commit c0ca8c6

Please sign in to comment.