From: "ordex (Code Review)" Date: Thu, 22 May 2025 21:08:28 +0000 In-Reply-To: References: Reply-To: antonio@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., gert@...1296... Message-ID: <240d6d0414d0fee54460b8572e30250197728cb3-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="bMiD7EyTuVs="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dco_linux: avoid bogus text when netlink message is not parsed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --bMiD7EyTuVs= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: cron2, flichtenheld, ordex, plaisthos. Hello cron2, flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1027?usp=3Demail to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review-1 by cron2 Change subject: dco_linux: avoid bogus text when netlink message is not par= sed ...................................................................... dco_linux: avoid bogus text when netlink message is not parsed We may bail out parsing an incoming DCO message because it may concern a different interface. In that case we print the following debug messages: dco_do_read ovpn-dco: ignoring message (type=3D5) for foreign ifindex 313 process_incoming_dco: received message of type 0 - ignoring However, the last message is confusing, because there is no message of type 0 being received, but the message_type was simply not initialized. Bail out parsing earlier and avoid printing any bogus text. Change-Id: I568faa12a5960e8b69de23c2df413b70b231592c Signed-off-by: Antonio Quartulli --- M src/openvpn/forward.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/27/1027/2 diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index ed4cdb4..b90a88c 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1251,6 +1251,12 @@ dco_do_read(dco); + /* no message was parsed - bail out */ + if (dco->dco_message_type =3D=3D 0) + { + return; + } + /* FreeBSD currently sends us removal notifcation with the old peer-id= in * p2p mode with the ping timeout reason, so ignore that one to not sh= oot * ourselves in the foot and removing the just established session */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1027?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: I568faa12a5960e8b69de23c2df413b70b231592c Gerrit-Change-Number: 1027 Gerrit-PatchSet: 2 Gerrit-Owner: ordex Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: cron2 Gerrit-Attention: flichtenheld Gerrit-Attention: ordex Gerrit-MessageType: newpatchset --bMiD7EyTuVs= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: cron2, flichtenheld, ordex, plais= thos.

ordex uploaded patch set #2 to this change.

View Change

The following approvals got outdated and were removed: Code-Review-1 by cron2

dco_linux: avoid bogus text when netlink message is =
not parsed

We may bail out parsing an incoming DCO message because i= t may
concern a different interface.
In that case we print the follow= ing debug messages:

dco_do_read
ovpn-dco: ignoring messag= e (type=3D5) for foreign ifindex 313
process_incoming_dco: received = message of type 0 - ignoring

However, the last message is confusing,= because there is no message
of type 0 being received, but the message_t= ype was simply not
initialized.

Bail out parsing earlier and avoi= d printing any bogus text.

Change-Id: I568faa12a5960e8b69de23c2df413= b70b231592c
Signed-off-by: Antonio Quartulli <antonio@...2726...><= br>---
M src/openvpn/forward.c
1 file changed, 6 insertions(+), 0 del= etions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/ch=
anges/27/1027/2
diff --git a/src/openvpn/forward.c b/src/openvpn/fo=
rward.c
index ed4cdb4..b90a88c 100644
--- a= /src/openvpn/forward.c
+++ b/src/openvpn/forward.c@@ -1251,6 +1251,12 @@

dco_d= o_read(dco);

+ /* no message was parsed - bail out */
+ if (dco->dco_message_type =3D=3D 0= )
+ {
+ return;
+ }
+
/* FreeBSD currently sends u= s removal notifcation with the old peer-id in
* p2p m= ode with the ping timeout reason, so ignore that one to not shoot * ourselves in the foot and removing the just established sess= ion */

To view, visit change 1027. To unsub= scribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I568faa12a5960e8b69de23c2df4= 13b70b231592c
Gerrit-Change-Number: 1027
Gerrit-PatchSet: 2
Gerrit-Owner: ordex <antonio@...2726...>=
Gerrit-Reviewer: cron2 <gert@...1296...>=
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: cron2 <gert@...1296...>= ;
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: ordex <antonio@...2726...= >
Gerrit-MessageType: newpatchset
--bMiD7EyTuVs=--