]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Send AUTH_FAILED message to clients on renegotiation failures
authorArne Schwabe <arne@rfc2549.org>
Fri, 23 Oct 2020 12:02:58 +0000 (14:02 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 26 Nov 2020 12:31:20 +0000 (13:31 +0100)
This changes the exit in server mode on renegotiation to an exit that
also sends an AUTH_FAILED to the client. Any previously set failed auth
reason is passed to the client.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20201023120259.29783-6-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21222.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c

index 958246c41ddaa6a770f1750657085206c5cd698c..67615a6bf33d78b6c58daa465380fdcef9adc978 100644 (file)
@@ -155,7 +155,14 @@ check_tls(struct context *c)
         }
         else if (tmp_status == TLSMP_KILL)
         {
-            register_signal(c, SIGTERM, "auth-control-exit");
+            if (c->options.mode == MODE_SERVER)
+            {
+                send_auth_failed(c, c->c2.tls_multi->client_reason);
+            }
+            else
+            {
+                register_signal(c, SIGTERM, "auth-control-exit");
+            }
         }
 
         interval_future_trigger(&c->c2.tmp_int, wakeup);