From: "mrbff (Code Review)"
Date: Tue, 20 Aug 2024 12:23:26 +0000
References:
Reply-To: marco@...2726..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...
Message-ID: <42cc26dd37953dad1a92c6901ead7c1e483e19d1-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="9rmwunN+oqA="; charset=UTF-8
Subject: [Openvpn-devel] [S] Change in openvpn[master]: tun: removed
unnecessary route installations
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: plaisthos , flichtenheld
Cc: openvpn-devel
--9rmwunN+oqA=
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/+/731?usp=3Demail
to review the following change.
Change subject: tun: removed unnecessary route installations
......................................................................
tun: removed unnecessary route installations
Removed superfluous calls to 'add_route_ipv6' for adding ipv6 routes after =
tun opening in OpenBSD, NetBSD and Darwin.
Change-Id: I235891212b15277349810913c9c1763da5c48587
Signed-off-by: Marco Baffo
---
M src/openvpn/route.c
M src/openvpn/tun.c
2 files changed, 1 insertion(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/31/731/1
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 71b5b42..31a634a 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -2244,9 +2244,6 @@
{
argv_printf_cat(&argv, "-link -iface %s", device);
}
- /* FIX ME: in NetBSD in TUN mode, the route is already added by ifconf=
ig
- * so add_route_ipv6 fail with 'Invalid argument' or 'File exists'
- */
argv_msg(D_ROUTE, &argv);
bool ret =3D openvpn_execve_check(&argv, es, 0,
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index d878161..7bdc6c4 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -1010,8 +1010,7 @@
#endif /* ifdef _WIN32 */
}
-#if defined(_WIN32) \
- || defined(TARGET_DARWIN) || defined(TARGET_NETBSD) || defined(TARGET_=
OPENBSD)
+#if defined(_WIN32)
/* some of the platforms will auto-add a "network route" pointing
* to the interface on "ifconfig tunX 2001:db8::1/64", others need
@@ -1203,11 +1202,6 @@
"FreeBSD BSD 'ifconfig inet6 -ifdisabled' failed"=
);
#endif
-#if defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) \
- || defined(TARGET_DARWIN)
- /* and, hooray, we explicitly need to add a route... */
- add_route_connected_v6_net(tt, es, is_multipoint);
-#endif
#elif defined(TARGET_AIX)
argv_printf(&argv, "%s %s inet6 %s/%d mtu %d up", IFCONFIG_PATH, ifnam=
e,
ifconfig_ipv6_local, tt->netbits_ipv6, tun_mtu);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/731?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: I235891212b15277349810913c9c1763da5c48587
Gerrit-Change-Number: 731
Gerrit-PatchSet: 1
Gerrit-Owner: mrbff
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-Attention: flichtenheld
Gerrit-MessageType: newchange
--9rmwunN+oqA=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld, plaisthos.
mrbff would like plaisthos and flichtenheld to review t=
his change.
Vi=
ew Change
tun: removed unnecessary route installations
Removed s=
uperfluous calls to 'add_route_ipv6' for adding ipv6 routes after t=
un opening in OpenBSD, NetBSD and Darwin.
Change-Id: I235891212b1527=
7349810913c9c1763da5c48587
Signed-off-by: Marco Baffo <marco@...2786...=
..>
---
M src/openvpn/route.c
M src/openvpn/tun.c
2 files ch=
anged, 1 insertion(+), 10 deletions(-)
git pull ssh://gerrit.open=
vpn.net:29418/openvpn refs/changes/31/731/1
diff --git a/src/openvp=
n/route.c b/src/openvpn/route.c
index 71b5b42..31a634a 1006=
44
--- a/src/openvpn/route.c
+++ b/src/open=
vpn/route.c
@@ -2244,9 +2244,6 @@
{
argv_printf_cat(&argv, "-link -iface %s&quo=
t;, device);
}
- /* FIX ME: in NetBSD in TUN mode, the route is already ad=
ded by ifconfig
- *=
so add_route_ipv6 fail with 'Invalid argument' or 'File exists=
'
- */
argv_msg(D_ROUTE, &argv);
bool ret =3D openvpn_execve_check(&argv, es, 0,
=
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index d8=
78161..7bdc6c4 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -1010,8 +1010,7 @@
=
#endif /* ifdef _WIN32 */
}
-#if defined(_WIN32) \
- || defined(TARGET_DA=
RWIN) || defined(TARGET_NETBSD) || defined(TARGET_OPENBSD)
+#if defined(_WIN32)
=
/* some of the platforms will auto-add a "network r=
oute" pointing
* to the interface on "ifconfig =
tunX 2001:db8::1/64", others need
@@ -1203,11 +1202,6 =
@@
"FreeBSD BSD 'ifconfi=
g inet6 -ifdisabled' failed");
#endif
<=
span>
-#if defined(TAR=
GET_OPENBSD) || defined(TARGET_NETBSD) \
- || defined(TARGET_DARWIN)
- /* and, hooray, we explicitly need to add a =
route... */
- add_ro=
ute_connected_v6_net(tt, es, is_multipoint);
-#endif
#elif defined(TARGET_AIX)
argv_printf(&argv, "%s %s inet6 %s/%d mtu %d up=
", IFCONFIG_PATH, ifname,
ifconfig_ip=
v6_local, tt->netbits_ipv6, tun_mtu);
<=
p>To view, visit change 731. To unsubscribe, or for help writing mail filters,=
visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I235891212b15277349810913c9c=
1763da5c48587
Gerrit-Change-Number: 731
Gerrit-PatchSet: 1
Gerrit-Owner: mrbff <marco@...2726...> <=
/div>
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
--9rmwunN+oqA=--