diff mbox series

[iproute2] libnetlink: linkdump_req is done for AF_BRIDGE as well

Message ID 20190107002350.24405-1-dsahern@kernel.org
State Accepted
Delegated to: David Ahern
Headers show
Series [iproute2] libnetlink: linkdump_req is done for AF_BRIDGE as well | expand

Commit Message

David Ahern Jan. 7, 2019, 12:23 a.m. UTC
From: David Ahern <dsahern@gmail.com>

The bridge command 'vlan show' calls rtnl_linkdump_req_filter for
family AF_BRIDGE. Update rtnl_linkdump_req_filter to send the filter
for that family as well.

Fixes: d97b16b2c906 ("libnetlink: linkdump_req: Only AF_UNSPEC family expects an ext_filter_mask")
Reported-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
---
 lib/libnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ido Schimmel Jan. 7, 2019, 7:41 a.m. UTC | #1
On Sun, Jan 06, 2019 at 04:23:50PM -0800, David Ahern wrote:
> From: David Ahern <dsahern@gmail.com>
> 
> The bridge command 'vlan show' calls rtnl_linkdump_req_filter for
> family AF_BRIDGE. Update rtnl_linkdump_req_filter to send the filter
> for that family as well.
> 
> Fixes: d97b16b2c906 ("libnetlink: linkdump_req: Only AF_UNSPEC family expects an ext_filter_mask")
> Reported-by: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: David Ahern <dsahern@gmail.com>

Tested-by: Ido Schimmel <idosch@mellanox.com>

Thanks!
diff mbox series

Patch

diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index 98cb9d9471ae..110f47bcd65a 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -449,7 +449,7 @@  int rtnl_linkdump_req(struct rtnl_handle *rth, int family)
 int rtnl_linkdump_req_filter(struct rtnl_handle *rth, int family,
 			    __u32 filt_mask)
 {
-	if (family == AF_UNSPEC) {
+	if (family == AF_UNSPEC || family == AF_BRIDGE) {
 		struct {
 			struct nlmsghdr nlh;
 			struct ifinfomsg ifm;