Change in openvpn[master]: networking_sitnl: Make sitnl_parse_rtattr* return void
A message that is not in the archive (sent off-list or not yet received): gerrit.1775421558000.Idfe2afd9616e17f0f80a914ff054ae18f0b6972b@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1614?usp=email
to review the following change.
Change subject: networking_sitnl: Make sitnl_parse_rtattr* return void
......................................................................
networking_sitnl: Make sitnl_parse_rtattr* return void
It returned a constant value so it didn't actually do anything.
Identified by cppcheck.
---
M src/openvpn/networking_sitnl.c
1 file changed, 5 insertions(+), 16 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/14/1614/1
src/openvpn/networking_sitnl.c +5 -16
@@ -1351,7 +1351,7 @@return ret; } -static int +static void sitnl_parse_rtattr_flags (struct rtattr *tb[],size_t max,struct rtattr *rta,size_t len,unsigned short flags) {
@@ -1375,14 +1375,12 @@ {msg (D_ROUTE ,"%s: %zu bytes not parsed! (rta_len=%u)" , __func__, len, rta->rta_len); } - -return 0 ; } -static int +static void sitnl_parse_rtattr (struct rtattr *tb[],size_t max,struct rtattr *rta,size_t len) { -return sitnl_parse_rtattr_flags (tb, max, rta, len,0 ); +sitnl_parse_rtattr_flags (tb, max, rta, len,0 ); }#define sitnl_parse_rtattr_nested (tb, max, rta) \
@@ -1394,23 +1392,14 @@char *type = arg;struct ifinfomsg *ifi =NLMSG_DATA (n);struct rtattr *tb[IFLA_MAX +1 ]; -int ret; - ret =sitnl_parse_rtattr (tb,IFLA_MAX ,IFLA_RTA (ifi),IFLA_PAYLOAD (n)); -if (ret <0 ) - { -return ret; - } +sitnl_parse_rtattr (tb,IFLA_MAX ,IFLA_RTA (ifi),IFLA_PAYLOAD (n));if (tb[IFLA_LINKINFO ]) {struct rtattr *tb_link[IFLA_INFO_MAX +1 ]; - ret =sitnl_parse_rtattr_nested (tb_link,IFLA_INFO_MAX , tb[IFLA_LINKINFO ]); -if (ret <0 ) - { -return ret; - } +sitnl_parse_rtattr_nested (tb_link,IFLA_INFO_MAX , tb[IFLA_LINKINFO ]);if (!tb_link[IFLA_INFO_KIND ]) {
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1614?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Idfe2afd9616e17f0f80a914ff054ae18f0b6972b
Gerrit-Change-Number: 1614
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos.
ordex has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1614?usp=email )
Change subject: networking_sitnl: Make sitnl_parse_rtattr* return void
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
indeed, this patch makes sense. sitnl_parse_rtattr is just parsing what it can, without ever failing. Thanks!
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1614?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Idfe2afd9616e17f0f80a914ff054ae18f0b6972b
Gerrit-Change-Number: 1614
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Wed, 08 Apr 2026 20:08:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
PATCH v2 1/1 networking_sitnl: Make sitnl_parse_rtattr* return void
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
It returned a constant value so it didn't actually do anything.
Identified by cppcheck.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1614
---
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/+/1614
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Antonio Quartulli <[email protected]...>
src/openvpn/networking_sitnl.c +5 -16
@@ -1351,7 +1351,7 @@return ret; } -static int +static void sitnl_parse_rtattr_flags (struct rtattr *tb[],size_t max,struct rtattr *rta,size_t len,unsigned short flags) {
@@ -1375,14 +1375,12 @@ {msg (D_ROUTE ,"%s: %zu bytes not parsed! (rta_len=%u)" , __func__, len, rta->rta_len); } - -return 0 ; } -static int +static void sitnl_parse_rtattr (struct rtattr *tb[],size_t max,struct rtattr *rta,size_t len) { -return sitnl_parse_rtattr_flags (tb, max, rta, len,0 ); +sitnl_parse_rtattr_flags (tb, max, rta, len,0 ); }#define sitnl_parse_rtattr_nested (tb, max, rta) \
@@ -1394,23 +1392,14 @@char *type = arg;struct ifinfomsg *ifi =NLMSG_DATA (n);struct rtattr *tb[IFLA_MAX +1 ]; -int ret; - ret =sitnl_parse_rtattr (tb,IFLA_MAX ,IFLA_RTA (ifi),IFLA_PAYLOAD (n)); -if (ret <0 ) - { -return ret; - } +sitnl_parse_rtattr (tb,IFLA_MAX ,IFLA_RTA (ifi),IFLA_PAYLOAD (n));if (tb[IFLA_LINKINFO ]) {struct rtattr *tb_link[IFLA_INFO_MAX +1 ]; - ret =sitnl_parse_rtattr_nested (tb_link,IFLA_INFO_MAX , tb[IFLA_LINKINFO ]); -if (ret <0 ) - { -return ret; - } +sitnl_parse_rtattr_nested (tb_link,IFLA_INFO_MAX , tb[IFLA_LINKINFO ]);if (!tb_link[IFLA_INFO_KIND ]) {
[Openvpn-devel] [PATCH applied] Re: networking_sitnl: Make sitnl_parse_rtattr* return void
Straightforward and an ACK from Antonio, and all green in BB ;-)
Your patch has been applied to the master branch.
commit 9760928e39bce5620273ceb9c4a9f5b7471d1781
Author: Frank Lichtenheld Date: Wed Apr 8 22:42:07 2026 +0200
networking_sitnl: Make sitnl_parse_rtattr* return void
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Antonio Quartulli <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1614
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg36559.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#3) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1614?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by ordex
Change subject: networking_sitnl: Make sitnl_parse_rtattr* return void
......................................................................
networking_sitnl: Make sitnl_parse_rtattr* return void
It returned a constant value so it didn't actually do anything.
Identified by cppcheck.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1614
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg36559.html
---
M src/openvpn/networking_sitnl.c
1 file changed, 5 insertions(+), 16 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/14/1614/3
src/openvpn/networking_sitnl.c +5 -16
@@ -1351,7 +1351,7 @@return ret; } -static int +static void sitnl_parse_rtattr_flags (struct rtattr *tb[],size_t max,struct rtattr *rta,size_t len,unsigned short flags) {
@@ -1375,14 +1375,12 @@ {msg (D_ROUTE ,"%s: %zu bytes not parsed! (rta_len=%u)" , __func__, len, rta->rta_len); } - -return 0 ; } -static int +static void sitnl_parse_rtattr (struct rtattr *tb[],size_t max,struct rtattr *rta,size_t len) { -return sitnl_parse_rtattr_flags (tb, max, rta, len,0 ); +sitnl_parse_rtattr_flags (tb, max, rta, len,0 ); }#define sitnl_parse_rtattr_nested (tb, max, rta) \
@@ -1394,23 +1392,14 @@char *type = arg;struct ifinfomsg *ifi =NLMSG_DATA (n);struct rtattr *tb[IFLA_MAX +1 ]; -int ret; - ret =sitnl_parse_rtattr (tb,IFLA_MAX ,IFLA_RTA (ifi),IFLA_PAYLOAD (n)); -if (ret <0 ) - { -return ret; - } +sitnl_parse_rtattr (tb,IFLA_MAX ,IFLA_RTA (ifi),IFLA_PAYLOAD (n));if (tb[IFLA_LINKINFO ]) {struct rtattr *tb_link[IFLA_INFO_MAX +1 ]; - ret =sitnl_parse_rtattr_nested (tb_link,IFLA_INFO_MAX , tb[IFLA_LINKINFO ]); -if (ret <0 ) - { -return ret; - } +sitnl_parse_rtattr_nested (tb_link,IFLA_INFO_MAX , tb[IFLA_LINKINFO ]);if (!tb_link[IFLA_INFO_KIND ]) {
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1614?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Idfe2afd9616e17f0f80a914ff054ae18f0b6972b
Gerrit-Change-Number: 1614
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1614?usp=email )
Change subject: networking_sitnl: Make sitnl_parse_rtattr* return void
......................................................................
networking_sitnl: Make sitnl_parse_rtattr* return void
It returned a constant value so it didn't actually do anything.
Identified by cppcheck.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1614
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg36559.html
---
M src/openvpn/networking_sitnl.c
1 file changed, 5 insertions(+), 16 deletions(-)
src/openvpn/networking_sitnl.c +5 -16
@@ -1351,7 +1351,7 @@return ret; } -static int +static void sitnl_parse_rtattr_flags (struct rtattr *tb[],size_t max,struct rtattr *rta,size_t len,unsigned short flags) {
@@ -1375,14 +1375,12 @@ {msg (D_ROUTE ,"%s: %zu bytes not parsed! (rta_len=%u)" , __func__, len, rta->rta_len); } - -return 0 ; } -static int +static void sitnl_parse_rtattr (struct rtattr *tb[],size_t max,struct rtattr *rta,size_t len) { -return sitnl_parse_rtattr_flags (tb, max, rta, len,0 ); +sitnl_parse_rtattr_flags (tb, max, rta, len,0 ); }#define sitnl_parse_rtattr_nested (tb, max, rta) \
@@ -1394,23 +1392,14 @@char *type = arg;struct ifinfomsg *ifi =NLMSG_DATA (n);struct rtattr *tb[IFLA_MAX +1 ]; -int ret; - ret =sitnl_parse_rtattr (tb,IFLA_MAX ,IFLA_RTA (ifi),IFLA_PAYLOAD (n)); -if (ret <0 ) - { -return ret; - } +sitnl_parse_rtattr (tb,IFLA_MAX ,IFLA_RTA (ifi),IFLA_PAYLOAD (n));if (tb[IFLA_LINKINFO ]) {struct rtattr *tb_link[IFLA_INFO_MAX +1 ]; - ret =sitnl_parse_rtattr_nested (tb_link,IFLA_INFO_MAX , tb[IFLA_LINKINFO ]); -if (ret <0 ) - { -return ret; - } +sitnl_parse_rtattr_nested (tb_link,IFLA_INFO_MAX , tb[IFLA_LINKINFO ]);if (!tb_link[IFLA_INFO_KIND ]) {
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1614?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Idfe2afd9616e17f0f80a914ff054ae18f0b6972b
Gerrit-Change-Number: 1614
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>