From: "ordex (Code Review)"
Date: Fri, 23 May 2025 07:32:15 +0000
In-Reply-To:
References:
Reply-To: antonio@...2726..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...,
gert@...1296...
Message-ID:
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="syCc47KtxHA="; 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
--syCc47KtxHA=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: 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 (#3).
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/3
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index ed4cdb4..7134f30 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -1251,6 +1251,12 @@
dco_do_read(dco);
+ /* no message for us to handle - platform specific code has logged det=
ails */
+ 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: 3
Gerrit-Owner: ordex
Gerrit-Reviewer: cron2
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-Attention: flichtenheld
Gerrit-Attention: ordex
Gerrit-MessageType: newpatchset
--syCc47KtxHA=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld, ordex, plaisthos. <=
/p>
ordex uploaded patch set #3 to this change.
View Change=
a>
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 d=
ifferent interface.
In that case we print the following debug messages:<=
br>
dco_do_read
ovpn-dco: ignoring message (type=3D5) for for=
eign 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 notinitialized.
Bail out parsing earlier and avoid printing any bogus=
text.
Change-Id: I568faa12a5960e8b69de23c2df413b70b231592c
Signe=
d-off-by: Antonio Quartulli <antonio@...2726...>
---
M src/open=
vpn/forward.c
1 file changed, 6 insertions(+), 0 deletions(-)
=
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/27/1027/3
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index ed4cdb4..7134f30 100644
--- a/src/openvpn/forward=
.c
+++ b/src/openvpn/forward.c
@@ -1251,6 +=
1251,12 @@
dco_do_read(dco);<=
br>
+ /* no=
message for us to handle - platform specific code has logged details */
+ if (dco->dco_me=
ssage_type =3D=3D 0)
=
+ {
+ retur=
n;
+ }
<=
span style=3D"color: hsl(120, 100%, 40%);">+
/* FreeBS=
D currently sends us removal notifcation with the old peer-id in
=
* p2p mode with the ping timeout reason, so ignore that one to =
not shoot
* ourselves in the foot and removing the ju=
st established session */
To view, visi=
t change=
1027. To unsubscribe, 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: 3
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: flichtenheld <frank@...2375...=
41...>
Gerrit-Attention: ordex <antonio@...2726...=
>
Gerrit-MessageType: newpatchset
--syCc47KtxHA=--