]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
tweak the dtls_state handling in preparation for supporting GlobalProtect ESP
authorDaniel Lenski <dlenski@gmail.com>
Sat, 20 May 2017 22:43:25 +0000 (15:43 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 14 Aug 2017 15:53:37 +0000 (16:53 +0100)
commitcc6af8dd5818bde5a8fbaf23677da6c6ddf63238
treea53d17f05bea9804ab8239e7ac7b7031aa511dba
parent342a85bf8b49165dddeb679a1d4abd55afca89e3
tweak the dtls_state handling in preparation for supporting GlobalProtect ESP

If a protocol wishes to have dtls_state set to DTLS_SLEEPING after closing
UDP, then it must now do so explicitly, because the mainloop will no longer
set it.  This patch make both existing protocols set dtls_state explicitly
after closing the UDP connection.  (The nc protocol already did so
explicitly, but the anyconnect protocol didn't.)

The previous behavior, wherein dtls_state was *always* set to DTLS_SLEEPING
after closing UDP, was incompatible with the GlobalProtect VPN.
Disconnecting and reconnecting GlobalProtect VPN doesn't just require
require reconnecting the UDP socket and resending probes; it actually
invalidates any previously-obtained ESP secret.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
dtls.c
mainloop.c