]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
bugfix: condition for incomplete ESP config with GP was inverted
authorDaniel Lenski <dlenski@gmail.com>
Sun, 7 Mar 2021 22:40:00 +0000 (14:40 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Sun, 7 Mar 2021 22:40:00 +0000 (14:40 -0800)
Fixes #227. Messed this up in https://gitlab.com/openconnect/openconnect/-/commit/edb1591f313167df4b708123e338975335b55203

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
gpst.c

diff --git a/gpst.c b/gpst.c
index d06210b64758987aae2b73b75f98e78ea3187f2a..a08918aa513f20a05c5802fa510fb46907cfd51f 100644 (file)
--- a/gpst.c
+++ b/gpst.c
@@ -601,7 +601,7 @@ static int gpst_parse_config_xml(struct openconnect_info *vpninfo, xmlNode *xml_
                                        else if (!xmlnode_get_val(member, "ipsec-mode", &s) && strcmp(s, "esp-tunnel"))
                                                vpn_progress(vpninfo, PRG_ERR, _("GlobalProtect config sent ipsec-mode=%s (expected esp-tunnel)\n"), s);
                                }
-                               if (vpninfo->esp_enc > 0 && vpninfo->esp_hmac > 0 && vpninfo->enc_key_len > 0 && vpninfo->hmac_key_len > 0)
+                               if (!(vpninfo->esp_enc > 0 && vpninfo->esp_hmac > 0 && vpninfo->enc_key_len > 0 && vpninfo->hmac_key_len > 0))
                                        vpn_progress(vpninfo, PRG_ERR, "Server's ESP configuration is incomplete or uses unknown algorithms.\n");
                                else if (openconnect_setup_esp_keys(vpninfo, 0))
                                        vpn_progress(vpninfo, PRG_ERR, "Failed to setup ESP keys.\n");