]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
dco-linux: remove M_ERRNO flag when printing netlink error message
authorAntonio Quartulli <a@unstable.cc>
Mon, 20 Mar 2023 19:58:20 +0000 (20:58 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 21 Mar 2023 08:18:53 +0000 (09:18 +0100)
Netlink has its own error space and reports errors via the return
value of its functions.

For this reason remove the M_ERRNO flag when printing its errors.
At the moment we get something like this:

netlink reports error (-7): Invalid input data or parameter: Interrupted
system call (errno=4)

where the errno=4 (and its human readable representation) is a leftover
from the previous recv() interrupted by a signal and it is totally
unrelated to this netlink failure.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230320195820.6675-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26452.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco_linux.c

index e5cea3c719889f5ba374c0113c0fe4756079c79a..47961849bdd15d3da64b0def4531cef5465c3cf9 100644 (file)
@@ -153,7 +153,7 @@ ovpn_nl_recvmsgs(dco_context_t *dco, const char *prefix)
         default:
             if (ret)
             {
-                msg(M_NONFATAL|M_ERRNO, "%s: netlink reports error (%d): %s", prefix, ret, nl_geterror(-ret));
+                msg(M_NONFATAL, "%s: netlink reports error (%d): %s", prefix, ret, nl_geterror(-ret));
             }
             break;
     }