]> git.ipfire.org Git - thirdparty/openvpn.git/commit
dco_linux: use M_FATAL instead of M_ERR in netlink error code paths
authorAntonio Quartulli <antonio@mandelbit.com>
Wed, 23 Jul 2025 06:30:30 +0000 (08:30 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 23 Jul 2025 08:16:01 +0000 (10:16 +0200)
commitdfe71b0a397273efffabbc01d1f6a9933f607933
treefff2cb18f0ee663d2ffa94a142aa40e820f7faca
parentf1a2a37897a6517c4c321abb7bc343bf495c94e2
dco_linux: use M_FATAL instead of M_ERR in netlink error code paths

Netlink code doesn't set errno upon error (with the exception of
any *alloc() function which probably inherits the errno=ENOMEM
from the underlying malloc call), therefore we should not print
error messages with M_ERR, but rather rely on M_FATAL.

M_ERR is equivalent to M_FATAL with the addition of appending
": $errno" to the error string.

Since errno is not meaningful in this context, we can just opt
for the less confusing M_FATAL.

Change-Id: Ifc442b4426c02de7282d0f69629e8a10b679c589
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20250723063039.25449-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32271.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco_linux.c