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:
Eugene Yakubovich 2015-11-12 16:37:23 -08:00
parent 00326095f5
commit 1b0df1a7d3
1 changed files with 1 additions and 0 deletions

View File

@ -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)