From: Daniel Lenski Date: Fri, 28 May 2021 19:50:51 +0000 (-0700) Subject: Print an error message if dtls_addr is NULL in dtls_setup() X-Git-Tag: v8.20~165 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=828966dae38a6f3961b8681734e463fb162e1c80;p=users%2Fdwmw2%2Fopenconnect.git Print an error message if dtls_addr is NULL in dtls_setup() This should reduce confusion and help debugging in situations like #242, where a Cisco server apparently does not return any 'X-DTLS-*' headers upon connection. We were printing this message in connect_dtls_socket(), but since dtls_setup() gets called — and fails — *first* in that case, the message never got printed. Signed-off-by: Daniel Lenski --- diff --git a/dtls.c b/dtls.c index 63df51b9..b200f7c8 100644 --- a/dtls.c +++ b/dtls.c @@ -185,6 +185,7 @@ int dtls_setup(struct openconnect_info *vpninfo) return 0; if (!vpninfo->dtls_addr) { + vpn_progress(vpninfo, PRG_ERR, _("No DTLS address\n")); vpninfo->dtls_attempt_period = 0; return -EINVAL; }