Allows passing UAPI fd to service

This commit is contained in:
Mathias Hall-Andersen
2017-11-17 14:36:08 +01:00
parent 88801529fd
commit e1227d3af4
3 changed files with 111 additions and 67 deletions
+1 -1
View File
@@ -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
}