From: "ordex (Code Review)" Date: Fri, 13 Dec 2024 17:09:31 +0000 References: Reply-To: a@...2181..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="GD1FJMW3gyA="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dco: pass remoteaddr only for UDP peers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --GD1FJMW3gyA= 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/+/842?usp=3Demail to review the following change. Change subject: dco: pass remoteaddr only for UDP peers ...................................................................... dco: pass remoteaddr only for UDP peers TCP connected sockets do not need any remote addr because the destination is fixed. For this reason we can avoid sending the remote addr along the peer-new dco call. This change is important on Linux because the new 'ovpn' kernel module is stricter when it comes to accepting netlink messages and will reject calls with TCP sockets if a remote address is specified. Change-Id: I76e2e616c6ffe436a9627fa71aaace74030b2f4a Signed-off-by: Antonio Quartulli --- M src/openvpn/dco.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/842/1 diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index dcc80d3..b1a3715 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -494,7 +494,9 @@ } #endif int ret =3D dco_new_peer(&c->c1.tuntap->dco, multi->peer_id, - c->c2.link_socket->sd, NULL, remoteaddr, NULL, = NULL); + c->c2.link_socket->sd, NULL, + proto_is_dgram(ls->info.proto) ? remoteaddr : N= ULL, + NULL, NULL); if (ret < 0) { return ret; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/842?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: I76e2e616c6ffe436a9627fa71aaace74030b2f4a Gerrit-Change-Number: 842 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 --GD1FJMW3gyA= 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: pass remoteaddr only for UDP peers

TCP connected = sockets do not need any remote addr
because the destination is fixed.For this reason we can avoid sending the remote addr
along the peer-new= dco call.

This change is important on Linux because the new 'ov= pn'
kernel module is stricter when it comes to accepting
netlink = messages and will reject calls with TCP sockets
if a remote address is s= pecified.

Change-Id: I76e2e616c6ffe436a9627fa71aaace74030b2f4a
Si= gned-off-by: Antonio Quartulli <antonio@...2726...>
---
M src/o= penvpn/dco.c
1 file changed, 3 insertions(+), 1 deletion(-)

gi=
t pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/842/1
diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c
index d= cc80d3..b1a3715 100644
--- a/src/openvpn/dco.c
+++ b/src/openvpn/dco.c
@@ -494,7 +494,9 @@
<= span> }
#endif
int ret =3D dco_ne= w_peer(&c->c1.tuntap->dco, multi->peer_id,
- c->c2.link_= socket->sd, NULL, remoteaddr, NULL, NULL);
+ c->c2.link_socket-&= gt;sd, NULL,
+ = proto_is_dgram(ls->info.proto) ? remoteaddr : NULL,<= /span>
+ = NULL, NULL);
if (ret < 0)
= {
return ret;

=

To view, visit change 842. To unsubscribe, or for help writing mail filters,= visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76e2e616c6ffe436a9627fa71aa= ace74030b2f4a
Gerrit-Change-Number: 842
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
--GD1FJMW3gyA=--