Do not hard code MTU default
This commit is contained in:
parent
ac9912345b
commit
ab875491c0
|
@ -259,8 +259,8 @@ func NewDevice(tun TUNDevice, logger *Logger) *Device {
|
||||||
device.tun.device = tun
|
device.tun.device = tun
|
||||||
mtu, err := device.tun.device.MTU()
|
mtu, err := device.tun.device.MTU()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error.Println("Trouble determining MTU, assuming 1420:", err)
|
logger.Error.Println("Trouble determining MTU, assuming default:", err)
|
||||||
mtu = 1420
|
mtu = DefaultMTU
|
||||||
}
|
}
|
||||||
device.tun.mtu = int32(mtu)
|
device.tun.mtu = int32(mtu)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue