From: JuanJo Ciarlante Date: Thu, 12 Nov 2009 10:54:13 +0000 (+0100) Subject: * fix --disable-ipv6 build X-Git-Tag: v2.3-alpha1~240^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6caf7f3da06b8a75bf3451f49378f2f8eb8c53be;p=thirdparty%2Fopenvpn.git * fix --disable-ipv6 build --- diff --git a/route.c b/route.c index cf1033404..76a4b1069 100644 --- a/route.c +++ b/route.c @@ -581,7 +581,11 @@ redirect_default_route_to_vpn (struct route_list *rl, const struct tuntap *tt, u if (!local) { /* route remote host to original default gateway */ +#ifdef USE_PF_INET6 + /* if remote_host is not ipv4 (ie: ipv6), just skip + * adding this special /32 route */ if (rl->spec.remote_host != IPV4_INVALID_ADDR) { +#endif add_route3 (rl->spec.remote_host, ~0, rl->spec.net_gateway, @@ -589,9 +593,11 @@ redirect_default_route_to_vpn (struct route_list *rl, const struct tuntap *tt, u flags, es); rl->did_local = true; +#ifdef USE_PF_INET6 } else { dmsg (D_ROUTE, "ROUTE remote_host protocol differs from tunneled"); } +#endif } /* route DHCP/DNS server traffic through original default gateway */