]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix tls-auth mismatch OCC message when tls-cryptv2 is used.
authorArne Schwabe <arne@rfc2549.org>
Fri, 11 Dec 2020 12:59:57 +0000 (13:59 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 20 Jan 2021 18:44:50 +0000 (19:44 +0100)
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.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Steffan Karger <steffan@karger.me>
Message-Id: <20201211125957.7764-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21358.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c

index ff3954d5b78d4cedacd219d3beb4e40ec9462813..d573c3fd2497d7831cdef7a43d1bd615b208f6c5 100644 (file)
@@ -3962,7 +3962,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 "))
     {