mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 01:33:15 +08:00
Improve: add default mtu for fd device
This commit is contained in:
@@ -23,6 +23,9 @@ func Open(name string, mtu uint32) (device.Device, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot open fd: %s", name)
|
||||
}
|
||||
if mtu == 0 {
|
||||
mtu = defaultMTU
|
||||
}
|
||||
return open(fd, mtu)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user