From: "cron2 (Code Review)" Date: Tue, 17 Sep 2024 09:41:27 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, ralf@...2726..., frank@...2641... Message-ID: <8bfb6b7d9d83916e53931b7435ff6bac5b6fb0d2-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="G1cK7awvck4="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Fix check_addr_clash argument order List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ralf_lici , plaisthos , flichtenheld Cc: openvpn-devel --G1cK7awvck4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/737?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by flichtenheld Change subject: Fix check_addr_clash argument order ...................................................................... Fix check_addr_clash argument order In init_tun() make sure to pass the --local and --remote addresses in the host order so that they can be compared to the --ifconfig addresses. Change-Id: I5adbe0a79f078221c4bb5f3d39391a81b4d8adce Signed-off-by: Ralf Lici Acked-by: Frank Lichtenheld Message-Id: <20240917091433.24092-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29= 261.html Signed-off-by: Gert Doering --- M src/openvpn/tun.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/37/737/2 diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 8b6c34d..d5bad86 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -877,9 +877,10 @@ { if (curele->ai_family =3D=3D AF_INET) { + const in_addr_t local =3D ntohl(((struct sockaddr_in *= )curele->ai_addr)->sin_addr.s_addr); check_addr_clash("local", tt->type, - ((struct sockaddr_in *)curele->ai_add= r)->sin_addr.s_addr, + local, tt->local, tt->remote_netmask); } @@ -889,9 +890,10 @@ { if (curele->ai_family =3D=3D AF_INET) { + const in_addr_t remote =3D ntohl(((struct sockaddr_in = *)curele->ai_addr)->sin_addr.s_addr); check_addr_clash("remote", tt->type, - ((struct sockaddr_in *)curele->ai_add= r)->sin_addr.s_addr, + remote, tt->local, tt->remote_netmask); } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/737?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: I5adbe0a79f078221c4bb5f3d39391a81b4d8adce Gerrit-Change-Number: 737 Gerrit-PatchSet: 2 Gerrit-Owner: ralf_lici Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --G1cK7awvck4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #2 to the change originally cr= eated by ralf_lici.

View Change

The following approvals got outdated= and were removed: Code-Review+2 by flichtenheld

Fix check_addr_clash argument order

In= init_tun() make sure to pass the --local and --remote addresses in
the = host order so that they can be compared to the --ifconfig addresses.
Change-Id: I5adbe0a79f078221c4bb5f3d39391a81b4d8adce
Signed-off-by: Ral= f Lici <ralf@...2726...>
Acked-by: Frank Lichtenheld <frank@...493...= 2641...>
Message-Id: <20240917091433.24092-1-gert@...1296...>URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg= 29261.html
Signed-off-by: Gert Doering <gert@...1296...>
---M src/openvpn/tun.c
1 file changed, 4 insertions(+), 2 deletions(-)
=
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/37/737/=
2
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 8b6c34d..d5bad86 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -877,9 +877,10 @@
{
if (curele-&= gt;ai_family =3D=3D AF_INET)
{
<= span style=3D"color: hsl(120, 100%, 40%);">+ const in_ad= dr_t local =3D ntohl(((struct sockaddr_in *)curele->ai_addr)->sin_add= r.s_addr);

check_addr_clash("loca= l",
tt->type,=
- = ((struct sockaddr_in *)curele->ai_addr)->sin_addr.s_a= ddr,
+ = local,
= tt->local,
= tt->remote_netmask);
}
@@ -889,9 +890,10 @@

{
= if (curele->ai_family =3D=3D AF_INET)
= {
+ = const in_addr_t remote =3D ntohl(((struct sockaddr_in *)curele-= >ai_addr)->sin_addr.s_addr);
che= ck_addr_clash("remote",
= tt->type,
- ((struct sockaddr_in *)curele->= ai_addr)->sin_addr.s_addr,
+ remote,
= tt->local,
= tt->remote_netmask);
= }

To view, visit change 737. To uns= ubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I5adbe0a79f078221c4bb5f3d393= 91a81b4d8adce
Gerrit-Change-Number: 737
Gerrit-PatchSet: 2
Gerrit-Owner: ralf_lici <ralf@...2726...>= ;
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--G1cK7awvck4=--