Skip to content

Commit

Permalink
tun: format
Browse files Browse the repository at this point in the history
Signed-off-by: Jason A. Donenfeld <[email protected]>
  • Loading branch information
zx2c4 committed May 7, 2021
1 parent 7121927 commit 39e0b6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tun/alignment_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ func TestNativeTunAlignment(t *testing.T) {
}

checkAlignment(t, "NativeTun.rate", unsafe.Offsetof(tun.rate))
}
}
4 changes: 2 additions & 2 deletions tun/tun_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 39e0b6d

Please sign in to comment.