aboutsummaryrefslogtreecommitdiffstats
path: root/src/tun_linux.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tun_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tun_linux.go b/src/tun_linux.go
index ce6304c..2a5b276 100644
--- a/src/tun_linux.go
+++ b/src/tun_linux.go
@@ -227,7 +227,7 @@ func (tun *NativeTun) MTU() (int, error) {
val := binary.LittleEndian.Uint32(ifr[16:20])
if val >= (1 << 31) {
- return int(val-(1<<31)) - (1 << 31), nil
+ return int(toInt32(val)), nil
}
return int(val), nil
}