mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 20:13:05 +02:00
d8e99cf5c1
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> |
||
---|---|---|
.. | ||
ios | ||
linux | ||
enumiface.hpp | ||
hwaddr.hpp |