Browse code

Do not install a host route for the VPN on Android

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>

Arne Schwabe authored on 2015/09/17 19:23:58
Showing 1 changed files
... ...
@@ -768,6 +768,11 @@ init_route_ipv6_list (struct route_ipv6_list *rl6,
768 768
             r6->next = rl6->routes_ipv6;
769 769
             rl6->routes_ipv6 = r6;
770 770
 
771
+#ifndef TARGET_ANDROID
772
+	    /* On Android the VPNService protect function call will take of
773
+	     * avoiding routing loops, so ignore this part and let
774
+	     * need_remote_ipv6_route always evaluate to false
775
+	     */
771 776
 	    if ( remote_host_ipv6 &&
772 777
 		  route_ipv6_match_host( r6, remote_host_ipv6 ) )
773 778
 	      {
... ...
@@ -776,7 +781,8 @@ init_route_ipv6_list (struct route_ipv6_list *rl6,
776 776
 			print_in6_addr (r6->network, 0, &gc), r6->netbits,
777 777
 			print_in6_addr (*remote_host_ipv6, 0, &gc));
778 778
 	      }
779
-          }
779
+#endif
780
+	  }
780 781
       }
781 782
   }
782 783