]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Ignore Ipv6 route delete request on Android and set ipv4 verbosity to 7
authorArne Schwabe <arne@rfc2549.org>
Wed, 12 Jul 2023 09:46:20 +0000 (11:46 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 17 Jul 2023 16:46:07 +0000 (18:46 +0200)
Android has no facility nor need one to delete routes as routes are
automatically cleaned up when the tun interface is closed. Also adjust
the IPv4 message to be only shown and verb 7 and rephrase the message.

Change-Id: If8f920d378c31e9ea773ce1f56f3df50f1ec36cd
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230712094620.569273-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26848.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/route.c

index 0b369da440b7481ae2d629c9f86bdb630d2b33be..90e981e97088adaf93ce2bbc19885164ca59c27d 100644 (file)
@@ -2302,8 +2302,9 @@ delete_route(struct route_ipv4 *r,
     openvpn_execve_check(&argv, es, 0, "ERROR: OpenBSD/NetBSD route delete command failed");
 
 #elif defined(TARGET_ANDROID)
-    msg(M_NONFATAL, "Sorry, deleting routes on Android is not possible. The VpnService API allows routes to be set on connect only.");
-
+    msg(D_ROUTE_DEBUG, "Deleting routes on Android is not possible/not "
+        "needed. The VpnService API allows routes to be set "
+        "on connect only and will clean up automatically.");
 #elif defined(TARGET_AIX)
 
     {
@@ -2490,7 +2491,10 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt,
                 network, r6->netbits, gateway);
     argv_msg(D_ROUTE, &argv);
     openvpn_execve_check(&argv, es, 0, "ERROR: AIX route add command failed");
-
+#elif defined(TARGET_ANDROID)
+    msg(D_ROUTE_DEBUG, "Deleting routes on Android is not possible/not "
+        "needed. The VpnService API allows routes to be set "
+        "on connect only and will clean up automatically.");
 #else  /* if defined(TARGET_LINUX) */
     msg(M_FATAL, "Sorry, but I don't know how to do 'route ipv6' commands on this operating system.  Try putting your routes in a --route-down script");
 #endif /* if defined(TARGET_LINUX) */