Skip to contentSkip to conversation

networking_iproute2: don't pass M_WARN to openvpn_execve_check()

PATCH In review Antonio Quartulli 2 participants 2 messages Apr 7, 2022 – Apr 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 networking_iproute2: don't pass M_WARN to openvpn_execve_check()

openvpn_execve_check() expects a set of flags as third argument and not a loglevel. For this reason, if no FATAL behaviour is expected, we should simply pass 0. openvpn_execve_check() will then pick the appropriate loglevel on its own.

---
 src/openvpn/networking_iproute2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/openvpn/networking_iproute2.c +2 -2
index 3ca2bb35..02fd3cb6 100644
@@ -105,8 +105,8 @@ net_addr_ll_set(openvpn_net_ctx_t *ctx, const openvpn_net_iface_t *iface,
                 iproute_path, MAC_PRINT_ARG(addr), iface);
 
     argv_msg(M_INFO, &argv);
-    if (!openvpn_execve_check(&argv, ctx->es, M_WARN,
-                              "Linux ip link set addr failed"))
+    if (!openvpn_execve_check(&argv, ctx->es, 0,
+			      "Linux ip link set addr failed"))
     {
         ret = -1;
     }
Signature · 1 line
2.35.1
Acked-by on v1 1/1
#1 lore raw

Good catch :-)

Your patch introduced a whitespace change on the second line. I asked uncrustify, uncrustify said "previous indent is correct", so only changing the first line.

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

commit 545f6bdea30e04a09b118c4e1faf6523544fd935 (master) commit 113b6c4192ecb927997b187de023aec71712f312 (release/2.5)

Author: Antonio Quartulli
Date:   Thu Apr 7 22:14:11 2022 +0200
     networking_iproute2: don't pass M_WARN to openvpn_execve_check()

     Signed-off-by: Antonio Quartulli <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg24090.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering