From: "ordex (Code Review)" Date: Thu, 20 Mar 2025 00:19:58 +0000 References: Reply-To: a@...2181..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <88c3647a0f6bec03af01467ec1c2a41b59f11280-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="m7SMUb5UKCw="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: socket: use remote proto when creating client sockets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --m7SMUb5UKCw= 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/+/911?usp=3Demail to review the following change. Change subject: socket: use remote proto when creating client sockets ...................................................................... socket: use remote proto when creating client sockets When creating a socket to connect to a remote (this happens in client mode) always use the protocol specified for the remote. The listening protocol in this case is just ignored as it does not make any sense. Change-Id: I6d2ec69ac7a9ef5900d8f1d8541d6a19c9cb7df9 Signed-off-by: Antonio Quartulli --- M src/openvpn/socket.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/11/911/1 diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 6b32e30..ad97830 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -1886,6 +1886,11 @@ const char *remote_host =3D o->ce.remote; const char *remote_port =3D o->ce.remote_port; =20 + if (remote_host) + { + proto =3D o->ce.proto; + } + if (c->mode =3D=3D CM_CHILD_TCP || c->mode =3D=3D CM_CHILD_UDP) { struct link_socket *tmp_sock =3D NULL; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/911?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: I6d2ec69ac7a9ef5900d8f1d8541d6a19c9cb7df9 Gerrit-Change-Number: 911 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 --m7SMUb5UKCw= 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

socket: use remote proto when creating client sockets

= When creating a socket to connect to a remote (this happens
in client mo= de) always use the protocol specified for the
remote.

The listeni= ng protocol in this case is just ignored as it
does not make any sense.<= br>
Change-Id: I6d2ec69ac7a9ef5900d8f1d8541d6a19c9cb7df9
Signed-off-b= y: Antonio Quartulli <antonio@...2726...>
---
M src/openvpn/soc= ket.c
1 file changed, 5 insertions(+), 0 deletions(-)

git pull=
 ssh://gerrit.openvpn.net:29418/openvpn refs/changes/11/911/1
diff =
--git a/src/openvpn/socket.c b/src/openvpn/socket.c
index 6= b32e30..ad97830 100644
--- a/src/openvpn/socket.c+++ b/src/openvpn/socket.c
@@ -1886,6 +1886,11 @@
const char *remote_host =3D o->ce.remote;
<= span> const char *remote_port =3D o->ce.remote_port;


+ if (remote_ho= st)
+ {
= + proto =3D o->ce.pro= to;
+ }
= +
if (c-&g= t;mode =3D=3D CM_CHILD_TCP || c->mode =3D=3D CM_CHILD_UDP)
{
struct link_socket *tmp_sock =3D NULL;

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

<= /div>
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6d2ec69ac7a9ef5900d8f1d8541= d6a19c9cb7df9
Gerrit-Change-Number: 911
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
--m7SMUb5UKCw=--