From 2cab283c0066396a5f60178ed650f81c095065e4 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Tue, 19 May 2020 18:45:51 -0700 Subject: [PATCH] use check_address_sanity for F5 too Signed-off-by: Daniel Lenski --- f5.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/f5.c b/f5.c index 55a7e655..9a9ffb5b 100644 --- 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"), -- 2.50.1