Skip to content

Commit

Permalink
fix openconnect_disable_dtls / --no-dtls
Browse files Browse the repository at this point in the history
The default/startup value of dtls_state is DTLS_NOSECRET, not DTLS_DISABLED.
I broke this in !49 / 7e2129f

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
  • Loading branch information
dlenski committed Apr 1, 2021
1 parent 60d1f09 commit 2f1d4ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library.c
Expand Up @@ -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;
Expand Down

0 comments on commit 2f1d4ec

Please sign in to comment.