From 828966dae38a6f3961b8681734e463fb162e1c80 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Fri, 28 May 2021 12:50:51 -0700 Subject: [PATCH] Print an error message if dtls_addr is NULL in dtls_setup() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- dtls.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.49.0