Skip to contentSkip to conversation

Add MTU to Android IFCONFIG6 control command

PATCH In review Arne Schwabe 2 participants 2 messages Jul 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add MTU to Android IFCONFIG6 control command

Since OpenVPN nows supports IPv6 only connections, OpenVPN for Android cannot longer rely on IFCONFIG to send the MTU. Add sending the MTU to IFCONFIG6 too.

---
 src/openvpn/tun.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/openvpn/tun.c +2 -2
index f9b9c716..26baa206 100644
@@ -910,8 +910,8 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu,
 #elif defined(TARGET_ANDROID)
     char out6[64];
 
-    openvpn_snprintf(out6, sizeof(out6), "%s/%d",
-                     ifconfig_ipv6_local,tt->netbits_ipv6);
+    openvpn_snprintf(out6, sizeof(out6), "%s/%d %d",
+                     ifconfig_ipv6_local,tt->netbits_ipv6, tun_mtu);
     management_android_control(management, "IFCONFIG6", out6);
 #elif defined(TARGET_SOLARIS)
     argv_printf(&argv, "%s %s inet6 unplumb", IFCONFIG_PATH, ifname);
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw

"I guessed that something interesting might happen here" - nothing much to review, though, as it's Android specific and does not touch anything else (and no obvious issues with it).

Your patch has been applied to the master branch.

commit e050bdfe9489ae9d0a15cb000360b73c7c748b59

Author: Arne Schwabe
Date:   Tue Jul 3 18:17:51 2018 +0200
     Add MTU to Android IFCONFIG6 control command

     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg17186.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering