From: Chris Mi Date: Fri, 25 Jan 2019 10:37:07 +0000 (+0000) Subject: libnetlink: linkdump_req: AF_PACKET family also expects ext_filter_mask X-Git-Tag: v5.0.0~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17ed56fdf3bc2c5511bb9fa2f1e4487a3db721c0;p=thirdparty%2Fiproute2.git libnetlink: linkdump_req: AF_PACKET family also expects ext_filter_mask Without this fix, the VF info can't be showed using command "ip link". 146: ens1f0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 24:8a:07:ad:78:52 brd ff:ff:ff:ff:ff:ff vf 0 MAC 02:25:d0:12:01:01, spoof checking off, link-state auto, trust off, query_rss off vf 1 MAC 02:25:d0:12:01:02, spoof checking off, link-state auto, trust off, query_rss off Fixes: d97b16b2c906 ("libnetlink: linkdump_req: Only AF_UNSPEC family expects an ext_filter_mask") Signed-off-by: Chris Mi Acked-by: David Ahern Signed-off-by: Stephen Hemminger --- diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 110f47bcd..3beb4342d 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -476,7 +476,7 @@ int rtnl_linkdump_req_filter(struct rtnl_handle *rth, int family, int rtnl_linkdump_req_filter_fn(struct rtnl_handle *rth, int family, req_filter_fn_t filter_fn) { - if (family == AF_UNSPEC) { + if (family == AF_UNSPEC || family == AF_PACKET) { struct { struct nlmsghdr nlh; struct ifinfomsg ifm;