]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
use check_address_sanity for F5 too
authorDaniel Lenski <dlenski@gmail.com>
Wed, 20 May 2020 01:45:51 +0000 (18:45 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 20 May 2020 01:45:51 +0000 (18:45 -0700)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
f5.c

diff --git a/f5.c b/f5.c
index 55a7e655426466eb75a5ba989195a13862ae1848..9a9ffb5bc427f10880035dbf296ca3c068c8c84d 100644 (file)
--- a/f5.c
+++ b/f5.c
@@ -333,9 +333,10 @@ int f5_connect(struct openconnect_info *vpninfo)
        char *sid = NULL, *ur_z = NULL;
        int ipv4 = -1, ipv6 = -1, hdlc = -1;
        char *res_buf = NULL;
-
-       /* XXX: We should do what cstp_connect() does to check that configuration
-          hasn't changed on a reconnect. */
+       const char *old_addr = vpninfo->ip_info.addr;
+       const char *old_netmask = vpninfo->ip_info.netmask;
+       const char *old_addr6 = vpninfo->ip_info.addr6;
+       const char *old_netmask6 = vpninfo->ip_info.netmask6;
 
        if (!vpninfo->cookies && vpninfo->cookie)
                http_add_cookie(vpninfo, "MRHSession", vpninfo->cookie, 1);
@@ -407,6 +408,10 @@ int f5_connect(struct openconnect_info *vpninfo)
        if (ret < 0)
                goto out;
 
+       ret = check_address_sanity(vpninfo, old_addr, old_netmask, old_addr6, old_netmask6);
+       if (ret < 0)
+               goto out;
+
        if (ret != 201 && ret != 200) {
                vpn_progress(vpninfo, PRG_ERR,
                             _("Unexpected %d result from server\n"),