From: "mrbff (Code Review)" Date: Fri, 14 Feb 2025 10:30:15 +0000 In-Reply-To: References: Reply-To: marco@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., gert@...1296... Message-ID: <4ff8c3e54ebb6bb8f3d7324dbdce0725da441dc7-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="2nmjaGUtUqQ="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: get_default_gateway(): Make sure the get_default_gateway() function n... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , cron2 , flichtenheld Cc: openvpn-devel --2nmjaGUtUqQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: cron2, flichtenheld, mrbff, plaisthos. Hello cron2, flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/898?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: get_default_gateway(): Make sure the get_default_gateway() = function never receives IPV4_INVALID_ADDR as a destination. ...................................................................... get_default_gateway(): Make sure the get_default_gateway() function never r= eceives IPV4_INVALID_ADDR as a destination. Change-Id: I02afe6817433ca21aae76671c35151ec6a066933 Signed-off-by: Marco Baffo --- M src/openvpn/route.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/98/898/2 diff --git a/src/openvpn/route.c b/src/openvpn/route.c index d895e1c..bc41492 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -655,7 +655,7 @@ rl->spec.flags |=3D RTSA_DEFAULT_METRIC; } - get_default_gateway(&rl->rgi, remote_host, ctx); + get_default_gateway(&rl->rgi, remote_host !=3D IPV4_INVALID_ADDR ? rem= ote_host : INADDR_ANY, ctx); if (rl->rgi.flags & RGI_ADDR_DEFINED) { setenv_route_addr(es, "net_gateway", rl->rgi.gateway.addr, -1); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/898?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: I02afe6817433ca21aae76671c35151ec6a066933 Gerrit-Change-Number: 898 Gerrit-PatchSet: 2 Gerrit-Owner: mrbff Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: cron2 Gerrit-Attention: flichtenheld Gerrit-Attention: mrbff Gerrit-MessageType: newpatchset --2nmjaGUtUqQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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

mrbff uploaded patch set #2 to this change.

View Change

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

get_default_gateway(): Make sure the get_default_gat=
eway() function never receives IPV4_INVALID_ADDR as a destination.

C= hange-Id: I02afe6817433ca21aae76671c35151ec6a066933
Signed-off-by: Marco= Baffo <marco@...2726...>
---
M src/openvpn/route.c
1 file c= hanged, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openv=
pn.net:29418/openvpn refs/changes/98/898/2
diff --git a/src/openvpn=
/route.c b/src/openvpn/route.c
index d895e1c..bc41492 10064= 4
--- a/src/openvpn/route.c
+++ b/src/openv= pn/route.c
@@ -655,7 +655,7 @@
rl-= >spec.flags |=3D RTSA_DEFAULT_METRIC;
}
<= span>
- get_default= _gateway(&rl->rgi, remote_host, ctx);
+ get_default_gateway(&rl->rgi, remote_ho= st !=3D IPV4_INVALID_ADDR ? remote_host : INADDR_ANY, ctx);
if (rl->rgi.flags & RGI_ADDR_DEFINED)
{
setenv_route_addr(es, "net_gateway", rl-&= gt;rgi.gateway.addr, -1);

To view, visi= t change = 898. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I02afe6817433ca21aae76671c35= 151ec6a066933
Gerrit-Change-Number: 898
Gerrit-PatchSet: 2
Gerrit-Owner: mrbff <marco@...2726...> <= /div>
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: mrbff <marco@...2726...&g= t;
Gerrit-MessageType: newpatchset
--2nmjaGUtUqQ=--