]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Remove post_open_mtu code
authorArne Schwabe <arne@rfc2549.org>
Tue, 7 Dec 2021 17:01:56 +0000 (18:01 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 14 Dec 2021 08:35:41 +0000 (09:35 +0100)
This code is probably from a time when we could not set the MTU on
the Windows tap6 driver. Nowadays we can set the MTU on this device,
so this code is a noop now.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20211207170211.3275837-7-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23327.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c
src/openvpn/tun.c
src/openvpn/tun.h

index 92000b004435fd8eab3972edb0ec817df564788e..3049fa16d3e042de27aabdec46425f6be320079d 100644 (file)
@@ -1873,16 +1873,6 @@ do_open_tun(struct context *c)
                  c->c1.tuntap, c->plugins, c->c2.es, &c->net_ctx);
     }
 
-    /*
-     * Did tun/tap driver give us an MTU?
-     */
-    if (c->c1.tuntap->post_open_mtu)
-    {
-        frame_set_mtu_dynamic(&c->c2.frame,
-                              c->c1.tuntap->post_open_mtu,
-                              SET_MTU_TUN | SET_MTU_UPPER_BOUND);
-    }
-
     ret = true;
     static_context = c;
 #ifndef TARGET_ANDROID
index 75d5eaf7b27d008ba2121cd779c1e9297c0c6494..12bdd20056274b23f5d43eb8c5f82334b8bc1efe 100644 (file)
@@ -6071,7 +6071,6 @@ tuntap_get_mtu(struct tuntap *tt)
                         &mtu, sizeof(mtu),
                         &mtu, sizeof(mtu), &len, NULL))
     {
-        tt->post_open_mtu = (int)mtu;
         msg(D_MTU_INFO, "TAP-Windows MTU=%d", (int)mtu);
     }
 }
index aa1e47b5ae764d00592f4f3ceaab9201083b6bd2..d4657537c69fccda173209da3f3658ddcfa05f34 100644 (file)
@@ -214,10 +214,6 @@ struct tuntap
 #endif
     /* used for printing status info only */
     unsigned int rwflags_debug;
-
-    /* Some TUN/TAP drivers like to be ioctled for mtu
-     * after open */
-    int post_open_mtu;
 };
 
 static inline bool