1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00

Do not hard code MTU default

This commit is contained in:
Jason A. Donenfeld 2018-04-19 15:52:59 +02:00
parent ac9912345b
commit ab875491c0

View File

@ -259,8 +259,8 @@ func NewDevice(tun TUNDevice, logger *Logger) *Device {
device.tun.device = tun
mtu, err := device.tun.device.MTU()
if err != nil {
logger.Error.Println("Trouble determining MTU, assuming 1420:", err)
mtu = 1420
logger.Error.Println("Trouble determining MTU, assuming default:", err)
mtu = DefaultMTU
}
device.tun.mtu = int32(mtu)