summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2015-09-15 11:23:34 +0200
committerGert Doering <gert@greenie.muc.de>2015-09-15 13:02:04 +0200
commitad80d6779488e77bc81f395f61d4052184f9a589 (patch)
tree1b7e96f73a79b886ee91c3442f046eb5eed10757
parent300039789b23216f1733890063cef3120722f4cf (diff)
downloadopenvpn-ad80d6779488e77bc81f395f61d4052184f9a589.zip
openvpn-ad80d6779488e77bc81f395f61d4052184f9a589.tar.gz
openvpn-ad80d6779488e77bc81f395f61d4052184f9a589.tar.xz
Don't redirect the gateway on Android even if requested
Routing loops are avoided using the VPNService API Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1442309019-7586-4-git-send-email-arne@rfc2549.org> URL: http://article.gmane.org/gmane.network.openvpn.devel/10113 Signed-off-by: Gert Doering <gert@greenie.muc.de>
-rw-r--r--src/openvpn/route.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 3e16140..d7d2eee 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -528,8 +528,10 @@ add_block_local (struct route_list *rl)
{
size_t i;
+#ifndef TARGET_ANDROID
/* add bypass for gateway addr */
add_bypass_address (&rl->spec.bypass, rl->rgi.gateway.addr);
+#endif
/* block access to local subnet */
add_block_local_item (rl, &rl->rgi.gateway, rl->spec.remote_endpoint);
@@ -817,6 +819,7 @@ redirect_default_route_to_vpn (struct route_list *rl, const struct tuntap *tt, u
}
else
{
+#ifndef TARGET_ANDROID
bool local = BOOL_CAST(rl->flags & RG_LOCAL);
if (rl->flags & RG_AUTO_LOCAL) {
const int tla = rl->spec.remote_host_local;
@@ -849,6 +852,7 @@ redirect_default_route_to_vpn (struct route_list *rl, const struct tuntap *tt, u
dmsg (D_ROUTE, "ROUTE remote_host protocol differs from tunneled");
}
}
+#endif
/* route DHCP/DNS server traffic through original default gateway */
add_bypass_routes (&rl->spec.bypass, rl->rgi.gateway.addr, tt, flags, &rl->rgi, es);