move ICMP PacketTooBig sending into core

This commit is contained in:
Arceliar 2021-06-13 05:25:13 -05:00
parent 8621223a1f
commit 3393db8e77
5 changed files with 33 additions and 106 deletions

View file

@ -139,6 +139,7 @@ func (tun *TunAdapter) _start() error {
if tun.MTU() != mtu {
tun.log.Warnf("Warning: Interface MTU %d automatically adjusted to %d (supported range is 1280-%d)", tun.config.IfMTU, tun.MTU(), MaximumMTU())
}
tun.core.SetMTU(tun.MTU())
tun.isOpen = true
tun.isEnabled = true
go tun.read()