1
0
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:
Liu Hua 2016-01-30 15:34:36 +00:00
parent b495efb88c
commit 89b71e9bbf

View File

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