0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00
openvpn3/openvpn/netconf
Lev Stipakov d8e99cf5c1 win: improve "add bypass route" logic
When adding bypass route to remote we always use
default gateway. This doesn't work when remote is not
reachable via default gateway (local network,
custom route - OVPN3-653).

Implement "get best gateway" logic by traversing routing
table and find gateway with longest prefix match and
highest metric.

In case of seamless tunnel and redirect-gw "get best gateway"
will return VPN gateway when adding bypass route during reconnect
to another remote. VPN tunnel is likely broken at this point
and bypass route via VPN make reconnect impossible.

Fix that by storing VPN interface index and, when finding best gateway,
filter routes which use VPN interface.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-09-16 18:08:15 +03:00
..
ios Implemented EnumIface for enumerating network interfaces using 2014-08-22 15:16:16 -06:00
linux Update copyrights 2020-03-18 19:37:32 +01:00
enumiface.hpp Update copyrights 2020-03-18 19:37:32 +01:00
hwaddr.hpp win: improve "add bypass route" logic 2020-09-16 18:08:15 +03:00