]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
fix openconnect_disable_dtls / --no-dtls
authorDaniel Lenski <dlenski@gmail.com>
Wed, 31 Mar 2021 02:43:08 +0000 (19:43 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Thu, 1 Apr 2021 00:13:01 +0000 (17:13 -0700)
The default/startup value of dtls_state is DTLS_NOSECRET, not DTLS_DISABLED.
I broke this in !49 / 7e2129f8a906f3858dc3792e1519332bf26ced99

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

index c93e5a3b82a0bf4ff1be461ae8a4aceab1807258..cd407d4bcde48f569bdc08cc67d05d9bdab16bfa 100644 (file)
--- a/library.c
+++ b/library.c
@@ -637,7 +637,7 @@ int openconnect_disable_dtls(struct openconnect_info *vpninfo)
         * we currently do not have a reliable indicator of
         * this.
         */
-       if (vpninfo->dtls_state != DTLS_DISABLED
+       if (vpninfo->dtls_state != DTLS_NOSECRET
            || vpninfo->ssl_times.last_tx != 0)
                return -EINVAL;
        vpninfo->dtls_state = DTLS_DISABLED;