]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
If oNCP negotiation response is a redirect, cookie is invalid
authorDaniel Lenski <dlenski@gmail.com>
Wed, 13 Oct 2021 17:32:33 +0000 (10:32 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Sun, 14 Nov 2021 18:24:54 +0000 (10:24 -0800)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
oncp.c

diff --git a/oncp.c b/oncp.c
index bd2c263892b7ba6cdcb4e8f643029d6b9bff475f..8fbb1b4f4a7fcc709bfa86a04509019d76309ce4 100644 (file)
--- a/oncp.c
+++ b/oncp.c
@@ -523,7 +523,7 @@ int oncp_connect(struct openconnect_info *vpninfo)
                vpn_progress(vpninfo, PRG_ERR,
                             _("Unexpected %d result from server\n"),
                             ret);
-               ret = (ret >= 400 && ret <= 499) ? -EPERM : -EINVAL;
+               ret = ((ret >= 400 && ret <= 499) || ret == 302) ? -EPERM : -EINVAL;
                goto out;
        }