tun: format

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2021-05-07 12:21:27 +02:00
parent 7121927b87
commit 39e0b6dade
2 changed files with 3 additions and 3 deletions

View File

@ -64,4 +64,4 @@ func TestNativeTunAlignment(t *testing.T) {
}
checkAlignment(t, "NativeTun.rate", unsafe.Offsetof(tun.rate))
}
}

View File

@ -100,10 +100,10 @@ func (tun *NativeTun) routineRouteListener(tunIfindex int) {
continue
}
if data[3 /* type */ ] != unix.RTM_IFINFO {
if data[3 /* type */] != unix.RTM_IFINFO {
continue
}
ifindex := int(*(*uint16)(unsafe.Pointer(&data[12 /* ifindex */ ])))
ifindex := int(*(*uint16)(unsafe.Pointer(&data[12 /* ifindex */])))
if ifindex != tunIfindex {
continue
}