Created
March 15, 2020 23:18
-
-
Save gmt4/52dd2a2c0488758e2cd05593a05ca5a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 43cd27bf1ab3c36fc443adec1699cab5f448194f Mon Sep 17 00:00:00 2001 | |
From: gmt <[email protected]> | |
Date: Mon, 16 Mar 2020 00:07:22 +0100 | |
Subject: [PATCH] openvpn: Warn about failed peer connections on UDP | |
--- | |
src/openvpn/forward.c | 6 ++++++ | |
1 file changed, 6 insertions(+) | |
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c | |
index 8f90418..957e1bc 100644 | |
--- a/src/openvpn/forward.c | |
+++ b/src/openvpn/forward.c | |
@@ -903,6 +903,12 @@ process_incoming_link_part1(struct context *c, struct link_socket_info *lsi, boo | |
decrypt_status = openvpn_decrypt(&c->c2.buf, c->c2.buffers->decrypt_buf, | |
co, &c->c2.frame, ad_start); | |
+ if (!decrypt_status && !link_socket_connection_oriented(c->c2.link_socket)) | |
+ { | |
+ /* warn on auth/decrypt error of peer connection in UDP mode */ | |
+ msg(D_STREAM_ERRORS, "Peer Connection Failed from %s", print_link_socket_actual(&c->c2.from, &gc)); | |
+ } | |
+ | |
if (!decrypt_status && link_socket_connection_oriented(c->c2.link_socket)) | |
{ | |
/* decryption errors are fatal in TCP mode */ | |
-- | |
2.20.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment