Skip to contentSkip to conversation

Fix tls-auth mismatch OCC message when tls-cryptv2 is used.

PATCH In review Arne Schwabe 3 participants 3 messages Dec 11, 2020 – Jan 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix tls-auth mismatch OCC message when tls-cryptv2 is used.

A server with tls-cryptv2 and tls-auth produces the warning:

WARNING: 'tls-auth' is present in local config but missing in remote config, local='tls-auth'"

The tls-auth option has no argument so the strpefix with the space included does not match it.

---
 src/openvpn/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
index d824cbad..d9d492b2 100644
@@ -4138,7 +4138,7 @@ options_warning_safe_scan2(const int msglevel,
     if (strprefix(p1, "key-method ")
         || strprefix(p1, "keydir ")
         || strprefix(p1, "proto ")
-        || strprefix(p1, "tls-auth ")
+        || streq(p1, "tls-auth")
         || strprefix(p1, "tun-ipv6")
         || strprefix(p1, "cipher "))
     {
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 18 lines · Arne Schwabe

A server with tls-cryptv2 and tls-auth produces the warning:

WARNING: 'tls-auth' is present in local config but missing in remote config, local='tls-auth'"

The tls-auth option has no argument so the strpefix with the space included does not match it.

---
 src/openvpn/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +0 -0
index d824cbad..d9d492b2 100644

src/openvpn/options.c options_warning_safe_scan2(const int msglevel, · line 4144

Quoted 8 lines
src/openvpn/options.c +1 -1
@@ -4138,7 +4138,7 @@ options_warning_safe_scan2(const int msglevel,
     if (strprefix(p1, "key-method ")
         || strprefix(p1, "keydir ")
         || strprefix(p1, "proto ")
-        || strprefix(p1, "tls-auth ")
+        || streq(p1, "tls-auth")
         || strprefix(p1, "tun-ipv6")
         || strprefix(p1, "cipher "))
     {

Thanks for fixing this.

-Steffan

#2 lore raw
In reply to Arne Schwabe

Your patch has been applied to the master and release/2.5 branch.

Thanks :-)

commit 15daa9886b64a8378a6c5d68f79076dc44095696 (master) commit e1bcf8a4bf3986a25f3906abe213fc9cd171ea04 (release/2.5)

Author: Arne Schwabe
Date:   Fri Dec 11 13:59:57 2020 +0100
     Fix tls-auth mismatch OCC message when tls-cryptv2 is used.

     Signed-off-by: Arne Schwabe <[email protected]...>
     Acked-by: Steffan Karger <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg21358.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering