Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix link statistics pointer alignment
gc's `-d checkptr` option reported the following problem: ``` --- FAIL: TestAddrAdd (0.00s) panic: runtime error: unsafe pointer conversion [recovered] panic: runtime error: unsafe pointer conversion goroutine 19 [running]: testing.tRunner.func1(0xc00011a240) go/src/testing/testing.go:916 +0xaeb panic(0x7f5c80, 0xc00013a100) go/src/runtime/panic.go:973 +0x396 github.com/vishvananda/netlink.LinkDeserialize(0x0, 0xc000174010, 0x514, 0x514, 0x1, 0x1, 0x0, 0x0) netlink/link_linux.go:1674 +0x33c5 github.com/vishvananda/netlink.execGetLink(0xc0001540a0, 0xc00013a0a0, 0x2, 0x2, 0x3) netlink/link_linux.go:1495 +0x205 github.com/vishvananda/netlink.(*Handle).LinkByName(0xa95e70, 0x81c4c9, 0x2, 0x4, 0x4, 0xc, 0x1) netlink/link_linux.go:1415 +0x578 github.com/vishvananda/netlink.LinkByName(...) netlink/link_linux.go:1395 github.com/vishvananda/netlink.DoTestAddr(0xc00011a240, 0x82d878) netlink/addr_test.go:62 +0xfbc github.com/vishvananda/netlink.TestAddrAdd(0xc00011a240) netlink/addr_test.go:15 +0x45 testing.tRunner(0xc00011a240, 0x82d898) go/src/testing/testing.go:954 +0x1ec created by testing.(*T).Run go/src/testing/testing.go:1005 +0x661 FAIL github.com/vishvananda/netlink 0.006s FAIL ``` Make sure the link structures are properly aligned.
- Loading branch information