From: "ordex (Code Review)" Date: Fri, 13 Dec 2024 10:51:24 +0000 References: Reply-To: a@...2181..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <2e91e04f0d7c5b3289abf729faff133a762dd353-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="GkUxwMEcXKQ="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: dco_linux: extend netlink error cb with extra info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --GkUxwMEcXKQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/841?usp=3Demail to review the following change. Change subject: dco_linux: extend netlink error cb with extra info ...................................................................... dco_linux: extend netlink error cb with extra info A netlink error may contain more specific attributes: i.e. missing attributes or missing neted objects. Parse and print this information too. Change-Id: I9e27ff335d892429334137d028f8503da4e4ca5b Signed-off-by: Antonio Quartulli --- M src/openvpn/dco_linux.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/41/841/1 diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index b038382..3f0715e 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -339,6 +339,18 @@ (char *)nla_data(tb_msg[NLMSGERR_ATTR_MSG])); } + if (tb_msg[NLMSGERR_ATTR_MISS_NEST]) + { + msg(M_WARN, "kernel error: missing required nesting type %u\n", + nla_get_u32(tb_msg[NLMSGERR_ATTR_MISS_NEST])); + } + + if (tb_msg[NLMSGERR_ATTR_MISS_TYPE]) + { + msg(M_WARN, "kernel error: missing required attribute type %u\n", + nla_get_u32(tb_msg[NLMSGERR_ATTR_MISS_TYPE])); + } + return NL_STOP; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/841?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I9e27ff335d892429334137d028f8503da4e4ca5b Gerrit-Change-Number: 841 Gerrit-PatchSet: 1 Gerrit-Owner: ordex Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --GkUxwMEcXKQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

ordex would like plaisthos and flichtenheld to review t= his change.

Vi= ew Change

dco_linux: extend netlink error cb with extra info

A n= etlink error may contain more specific attributes: i.e.
missing attribut= es or missing neted objects.

Parse and print this information too.
Change-Id: I9e27ff335d892429334137d028f8503da4e4ca5b
Signed-off-by= : Antonio Quartulli <antonio@...2726...>
---
M src/openvpn/dco_= linux.c
1 file changed, 12 insertions(+), 0 deletions(-)

git p= ull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/41/841/1
di=
ff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c
index b038382..3f0715e 100644
--- a/src/openvpn/dco_linux= .c
+++ b/src/openvpn/dco_linux.c
@@ -339,6 = +339,18 @@
(char *)nla_data(tb_msg[NLMSGERR_AT= TR_MSG]));
}

+ if (tb_msg[NLMSGERR_ATTR_MISS_NEST])<= /span>
+ {
+ msg(M_WARN, "kernel e= rror: missing required nesting type %u\n",

+ nla_get_u32(tb_msg[NLMSGERR_ATTR_MI= SS_NEST]));
+ }
+
+ if (tb_msg[NLMSGERR_ATTR_MISS_TYPE])<= /span>
+ {
+ msg(M_WARN, "kernel e= rror: missing required attribute type %u\n",

+ nla_get_u32(tb_msg[NLMSGERR_ATTR_= MISS_TYPE]));
+ }<= /span>
+
= return NL_STOP;
}


To view, visit change 841. To unsubscribe, or for help writing m= ail filters, visit settings<= /a>.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9e27ff335d892429334137d028f= 8503da4e4ca5b
Gerrit-Change-Number: 841
Gerrit-PatchSet: 1
Gerrit-Owner: ordex <a@...2181...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--GkUxwMEcXKQ=--