[Openvpn-devel,v2] dco_linux: fix case statement by using proper error value

Message ID 20250723062012.22781-1-gert@greenie.muc.de
State New
Headers show
Series [Openvpn-devel,v2] dco_linux: fix case statement by using proper error value | expand

Commit Message

Gert Doering July 23, 2025, 6:20 a.m. UTC
From: Antonio Quartulli <antonio@mandelbit.com>

A M_ERR constant accidentally slipped in as possible
netlink error value.

Substitute it with the actual code matching the following
error message.

Change-Id: I18df6ef659cab9525dd7847b7dd3950fc1895dd5
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1095
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>

Comments

Gert Doering July 23, 2025, 8:15 a.m. UTC | #1
Stared at the code, makes sense.  Test compiled (after the explosion tonight,
you can never test enough :-) ).

Your patch has been applied to the master branch.

commit f1a2a37897a6517c4c321abb7bc343bf495c94e2
Author: Antonio Quartulli
Date:   Wed Jul 23 08:20:06 2025 +0200

     dco_linux: fix case statement by using proper error value

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


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c
index c92c196..58051f5 100644
--- a/src/openvpn/dco_linux.c
+++ b/src/openvpn/dco_linux.c
@@ -143,7 +143,7 @@ 
             msg(M_ERR, "%s: netlink out of memory error", prefix);
             break;
 
-        case -M_ERR:
+        case -NLE_AGAIN:
             msg(M_WARN, "%s: netlink reports blocking read - aborting wait", prefix);
             break;