The tun/tap routes need to be set with "metric 0", while this will
prevent routes to LAN gateways from being installed. So, set metric 0
only if no other interface is requested...
(Note: OpenSolaris can not specify host+interface gateways, so we just
use the GW addresses - it seems to still work
Hi,
this is the block of code that is missing for 2.4 on the IPv6/routing
side (correctly handle IPv6 routes that overlap with the IPv6 address
of the VPN server) - if it's in, I'm ready to go...
01+02 are refactoring without functional code changes, to make the IPv6
data structures more similar
route_gateway_address -> route_ipv6_gateway_address
route_gateway_info-> route_ipv6_gateway_info
Signed-off-by: Gert Doering
---
src/openvpn/route.h | 28
1 file changed, 28 insertions(+)
diff --git a/src/openvpn/route.h b/src/openvpn/route.h
index 7e96a2f..5ab5
Add "ipv6" and "!ipv4" sub-options to "--redirect-gateway" option.
This is done in the same way as in the OpenVPN 3 code base, so
"--redirect-gateway ipv6" will redirect both IPv4 and IPv6 - if you
want v6-only, use "--redirect-gateway ipv6 !ipv4".
The actual implementation is much simpler than f
adjust "struct route_ipv6_list" (and all users) to reflect changes
to "struct route_list" done in commit 7fb0e07e, namely:
- new member "rl6->iflags"(RL_* flags)
- new member "rl6->spec_flags"(RTSA_* flags)
- new member "rl6->remote_host_ipv6" (--remote address we're talkin
Signed-off-by: Gert Doering
---
src/openvpn/route.c | 147 +++-
1 file changed, 135 insertions(+), 12 deletions(-)
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index fd8209d..cca5cfe 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/rout
To get access to that functionality, bump Windows API level for MinGW
compilation from NTDDI_WINXP/_WIN32_WINNT_WINXP to ..._VISTA, and
shuffle around WIN32 includes a bit in syshead.h
MinGW 32 seems to be broken regarding MIB_TCP_STATE enum, so add typedef
for that - surrounding #ifdefs found by
adjust "struct route_ipv6" (and all users) to reflect changes
to "struct route_ipv4" done in commit 7fb0e07e, namely:
- new member "r6->flags"
- "r6->defined"becomes "r6->flags & RT_DEFINED"
- "r6->metric_defined" becomes "r6->flags & RT_METRIC_DEFINED"
- route addition status is store
- introduce get_default_gateway_ipv6() and add stub functions with the
implementation plan to the 4 major code blocks here (Windows,
Linux/Android, *BSD and Solaris, "others")
- add &rgi6 to print_default_gateway(), and teach it to print v4, v6
or both, depending on the calling environment
As for IPv4, a common implementation for all (supported) BSD families
and Solaris. Supporting the latter requires separate implementations
for IPv4 and IPv6, unfortunately, so it's quite a bit of duplicate
code.
Further, extend add_route_ipv6() and delete_route_ipv6() to handle
link-local gateway
- socket.[ch]: add link_socket_current_remote_ipv6() helper to extract
current address of remote VPN server (if IPv6, NULL otherwise), IPv6
equivalent to link_socket_current_remote()
- init.c: pass remote VPN server address to init_route_ipv6_list()
(link_socket_current_remote_ipv6())
-
11 matches
Mail list logo