diff --git a/etc/vswitch.conf b/etc/vswitch.conf index ead8aab..e596a6e 100644 --- a/etc/vswitch.conf +++ b/etc/vswitch.conf @@ -1,4 +1,4 @@ -MTU = 1400 +MTU = 1500 DEVICENAME = switch0 DEVICEADDR = 10.0.9.2 DEVICEMASK = 255.255.255.0 diff --git a/tap/libtap.go b/tap/libtap.go index e3b5d50..dd23502 100644 --- a/tap/libtap.go +++ b/tap/libtap.go @@ -37,7 +37,7 @@ func (vd *Vswitchdevice) SetDeviceConf() { vd.mtu, vd.err = strconv.Atoi(conf.GetConfigItem("MTU")) - vd.frame = make([]byte, vd.mtu) + vd.frame = make([]byte, vd.mtu+22) // considering the header AND the VLAN tagging (if existing) = 22 bytes more log.Printf("[TAP] MTU SET TO: %v", vd.mtu)