]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Do not install a host route for the VPN on Android
authorArne Schwabe <arne@rfc2549.org>
Thu, 17 Sep 2015 10:23:58 +0000 (12:23 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 17 Sep 2015 18:05:27 +0000 (20:05 +0200)
Routing loops are avoided using the VPNService API protect API

Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1442485438-15704-1-git-send-email-arne@rfc2549.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/10135

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/route.c

index db4657e27496b292de83617d177d2224a4fcb2a0..ab8eb27f6573fdbf0ddfc96c842fa8a5bde2e97f 100644 (file)
@@ -768,6 +768,11 @@ init_route_ipv6_list (struct route_ipv6_list *rl6,
             r6->next = rl6->routes_ipv6;
             rl6->routes_ipv6 = r6;
 
+#ifndef TARGET_ANDROID
+           /* On Android the VPNService protect function call will take of
+            * avoiding routing loops, so ignore this part and let
+            * need_remote_ipv6_route always evaluate to false
+            */
            if ( remote_host_ipv6 &&
                  route_ipv6_match_host( r6, remote_host_ipv6 ) )
              {
@@ -776,7 +781,8 @@ init_route_ipv6_list (struct route_ipv6_list *rl6,
                        print_in6_addr (r6->network, 0, &gc), r6->netbits,
                        print_in6_addr (*remote_host_ipv6, 0, &gc));
              }
-          }
+#endif
+         }
       }
   }