From: "cron2 (Code Review)" Date: Fri, 31 Jan 2025 10:56:03 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: <781a38821936ecc731e2155caed8a6de7af08be8-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="lM83f8S2Zro="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: route.c: improve get_default_gateway() logic on Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stipa Cc: plaisthos , flichtenheld , openvpn-devel --lM83f8S2Zro= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos, stipa. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/879?usp=3Demail ) Change subject: route.c: improve get_default_gateway() logic on Windows ...................................................................... Patch Set 2: (2 comments) File src/openvpn/route.c: http://gerrit.openvpn.net/c/openvpn/+/879/comment/a12cf014_08dcec58 : PS2, Line 2812: DWORD a_index =3D adapter_index_of_ip(adapters, rgi->ga= teway.addr, NULL, &rgi->gateway.netmask); This fails for `ON_LINK` targets, where `gateway.addr =3D=3D 0.0.0.0`. The IPv6 code uses `BestRoute.InterfaceIndex`, because Windows nicely hands= this to us anyway. http://gerrit.openvpn.net/c/openvpn/+/879/comment/879c7db7_bf0b726d : PS2, Line 2827: the IPv6 part sets the `RGI_ON_LINK` flag when the `BestRoute.Nexthop` poin= ts to an empty IPv6 address. Testing with v4 seems to be similar, so for a= n onlink-prefix (same IPv4 subnet as on the LAN interface, or just `127.0.0= .1` to trigger `on-link I=3D1`) I get "ROUTE_GATEWAY 0.0.0.0" - but no ON_L= INK for v4, yet. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/879?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: I6c7e1cef637fe9fb3f3bc6ff4fb2c65599cd86fb Gerrit-Change-Number: 879 Gerrit-PatchSet: 2 Gerrit-Owner: stipa Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: stipa Gerrit-Comment-Date: Fri, 31 Jan 2025 10:56:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment --lM83f8S2Zro= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos, stipa. <= /p>

View C= hange

2 comments:

    =
  • File src/openvpn/route.c:

    • Patch Set #2, Line 2812:= DWORD a_index =3D adap= ter_index_of_ip(adapters, rgi->gateway.addr, NULL, &rgi->gateway.= netmask);

      This fails for `ON_LINK` targets, where `gateway.addr =3D=3D 0.0.0.0`.<= /p>

      The IPv6 code= uses `BestRoute.InterfaceIndex`, because Windows nicely hands this to us a= nyway.

    • Patch Set #2, Line 2827:

      the IPv6 part sets the `RGI_ON_LINK` flag when the `Be= stRoute.Nexthop` points to an empty IPv6 address. Testing with v4 seems to= be similar, so for an onlink-prefix (same IPv4 subnet as on the LAN interf= ace, or just `127.0.0.1` to trigger `on-link I=3D1`) I get "ROUTE_GATE= WAY 0.0.0.0" - but no ON_LINK for v4, yet.

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6c7e1cef637fe9fb3f3bc6ff4fb= 2c65599cd86fb
Gerrit-Change-Number: 879
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <lstipakov@...277...>= ;
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: stipa <lstipakov@...1663...= .>
Gerrit-Comment-Date: Fri, 31 Jan 2025 10:56:03= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
--lM83f8S2Zro=--