[Openvpn-devel] Add MTU to Android IFCONFIG6 control command

Message ID 20180703161751.7680-1-arne@rfc2549.org
State Accepted
Headers show
Series
  • [Openvpn-devel] Add MTU to Android IFCONFIG6 control command
Related show

Commit Message

Arne Schwabe July 3, 2018, 4:17 p.m.
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(-)

Comments

Gert Doering July 3, 2018, 7:30 p.m. | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

"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 <gert@greenie.muc.de>
     Message-Id: <20180703161751.7680-1-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17186.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Patch

diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index f9b9c716..26baa206 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -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);