]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Print an error message if dtls_addr is NULL in dtls_setup()
authorDaniel Lenski <dlenski@gmail.com>
Fri, 28 May 2021 19:50:51 +0000 (12:50 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Fri, 28 May 2021 19:50:51 +0000 (12:50 -0700)
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 <dlenski@gmail.com>
dtls.c

diff --git a/dtls.c b/dtls.c
index 63df51b96e8051e83334e04aef4a64b3c8843375..b200f7c8b7400d0d6e735407fb16f9dcdfadb2ca 100644 (file)
--- 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;
        }