From 5f95bc9091a7f17128c52fed44d864e713d13044 Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Sat, 6 Feb 2021 15:05:21 +0800 Subject: [PATCH] Fix: set MTU on windows --- device/tun/tun_windows.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/device/tun/tun_windows.go b/device/tun/tun_windows.go index c6b83d8..425130a 100755 --- a/device/tun/tun_windows.go +++ b/device/tun/tun_windows.go @@ -43,9 +43,8 @@ func Open(opts ...Option) (device.Device, error) { } t.iface = iface - t.mtu = defaultMTU - if t.mtu > 0 { - /* ignore */ + if t.mtu == 0 { + t.mtu = defaultMTU } ep, err := rwbased.New(iface, t.mtu)