mirror of https://github.com/vishvananda/netlink
Pass linkIndex filter into kernel for NeighList
This turns out to be especially important as there appears to be a bug in the kernel with bonding. The bug causes an infinite amount of fdb entries to be returned (it just cycle through the interfaces) if no interface filter is set.
This commit is contained in:
parent
00326095f5
commit
1b0df1a7d3
|
@ -133,6 +133,7 @@ func NeighList(linkIndex, family int) ([]Neigh, error) {
|
||||||
req := nl.NewNetlinkRequest(syscall.RTM_GETNEIGH, syscall.NLM_F_DUMP)
|
req := nl.NewNetlinkRequest(syscall.RTM_GETNEIGH, syscall.NLM_F_DUMP)
|
||||||
msg := Ndmsg{
|
msg := Ndmsg{
|
||||||
Family: uint8(family),
|
Family: uint8(family),
|
||||||
|
Index: uint32(linkIndex),
|
||||||
}
|
}
|
||||||
req.AddData(&msg)
|
req.AddData(&msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue