mirror of
https://github.com/vishvananda/netlink
synced 2025-03-25 04:26:51 +00:00
force AddList to get rid of unexpected information
Signed-off-by: Liu Hua <sdu.liu@huawei.com>
This commit is contained in:
parent
b495efb88c
commit
89b71e9bbf
@ -101,6 +101,10 @@ func AddrList(link Link, family int) ([]Addr, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
if family != FAMILY_ALL && msg.Family != uint8(family) {
|
||||
continue
|
||||
}
|
||||
|
||||
attrs, err := nl.ParseRouteAttr(m[msg.Len():])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user