diff options
-rw-r--r-- | route.c | 18 | ||||
-rw-r--r-- | socket.c | 2 |
2 files changed, 12 insertions, 8 deletions
@@ -581,13 +581,17 @@ redirect_default_route_to_vpn (struct route_list *rl, const struct tuntap *tt, u if (!local) { /* route remote host to original default gateway */ - add_route3 (rl->spec.remote_host, - ~0, - rl->spec.net_gateway, - tt, - flags, - es); - rl->did_local = true; + if (rl->spec.remote_host != 0xffffffff) { + add_route3 (rl->spec.remote_host, + ~0, + rl->spec.net_gateway, + tt, + flags, + es); + rl->did_local = true; + } else { + dmsg (D_ROUTE, "ROUTE remote_host protocol differs from tunneled"); + } } /* route DHCP/DNS server traffic through original default gateway */ @@ -2147,7 +2147,7 @@ link_socket_current_remote (const struct link_socket_info *info) */ #ifdef USE_PF_INET6 if (lsa->actual.dest.addr.sa.sa_family != AF_INET) - return 0; + return 0xffffffff; #else ASSERT (lsa->actual.dest.addr.sa.sa_family == AF_INET); #endif |