From: "cron2 (Code Review)" Date: Sat, 11 Oct 2025 11:49:11 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., marco@...2726..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <97b81865ea07c259b56a051cad5e1d20318ffdd4-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="qbip6arGs3E="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: redirect-gateway: only redirect traffic through TUN if address famili... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mrbff Cc: plaisthos , flichtenheld , openvpn-devel --qbip6arGs3E= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/12= 10?usp=3Demail ) Change subject: redirect-gateway: only redirect traffic through TUN if addr= ess families match ...................................................................... redirect-gateway: only redirect traffic through TUN if address families mat= ch Adds a check in do_init_route_ipv6_list() to add default routes toward the = TUN only if the TUN has IPv6 addresses. Github: fixes OpenVPN/openvpn#850 Github: see also OpenVPN/openvpn#863 Change-Id: Ib3458a9ed2eb38e00184c4a92659b83b97fe476c Signed-off-by: mrbff Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1210 Message-Id: <20251011111417.11802-1-gert@...1296...> URL: https://sourceforge.net/p/openvpn/mailman/message/59245295/ Signed-off-by: Gert Doering --- M src/openvpn/init.c 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index f8a0fee..aaa0573 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -1523,7 +1523,7 @@ /* redirect (IPv6) gateway to VPN? if yes, add a few more specifics */ - if (options->routes_ipv6->flags & RG_REROUTE_GW) + if (options->routes_ipv6->flags & RG_REROUTE_GW && options->ifconfig_i= pv6_local) { char *opt_list[] =3D { "::/3", "2000::/4", "3000::/4", "fc00::/7",= NULL }; int i; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1210?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ib3458a9ed2eb38e00184c4a92659b83b97fe476c Gerrit-Change-Number: 1210 Gerrit-PatchSet: 5 Gerrit-Owner: mrbff Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --qbip6arGs3E= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

redirect-gateway: only redirect traffic through =
TUN if address families match

Adds a check in do_init_route_ipv6_lis= t() to add default routes toward the TUN
only if the TUN has IPv6 addres= ses.

Github: fixes OpenVPN/openvpn#850
Github: see also OpenVPN/o= penvpn#863

Change-Id: Ib3458a9ed2eb38e00184c4a92659b83b97fe476c
S= igned-off-by: mrbff <marco@...2726...>
Acked-by: Gert Doering <= gert@...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1= 210
Message-Id: <20251011111417.11802-1-gert@...1296...>
URL: h= ttps://sourceforge.net/p/openvpn/mailman/message/59245295/
Signed-off-by= : Gert Doering <gert@...1296...>
---
M src/openvpn/init.c
1 = file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/openvpn/init.c b/src/openvpn/init.c
ind= ex f8a0fee..aaa0573 100644
--- a/src/openvpn/init.c<= br>+++ b/src/openvpn/init.c
@@ -1523,7 +1523,7 @@


/* redirect (IPv6) gateway to VPN? if = yes, add a few more specifics
*/
- if (options->routes_ipv6->flags = & RG_REROUTE_GW)
= + if (options->routes_ipv6->flags & RG_REROUTE_GW && o= ptions->ifconfig_ipv6_local)
{
= char *opt_list[] =3D { "::/3", "2000::/4", "3= 000::/4", "fc00::/7", NULL };
int i= ;

To view, visit change 1210. To unsubscrib= e, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib3458a9ed2eb38e00184c4a9265= 9b83b97fe476c
Gerrit-Change-Number: 1210
Gerrit-PatchSet: 5
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>
= --qbip6arGs3E=--