]> git.proxmox.com Git - mirror_iproute2.git/commit
bridge: fdb: Fix FDB dump with strict checking disabled
authorIdo Schimmel <idosch@mellanox.com>
Fri, 25 Jan 2019 17:09:17 +0000 (17:09 +0000)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 5 Feb 2019 23:27:28 +0000 (15:27 -0800)
commit264be1d887102d47d725b299a1b74393259015dc
tree560c5ab27bc907f25e9180fc31ce16230bf210f1
parent17ed56fdf3bc2c5511bb9fa2f1e4487a3db721c0
bridge: fdb: Fix FDB dump with strict checking disabled

While iproute2 correctly uses ifinfomsg struct as the ancillary header
when requesting an FDB dump on old kernels, it sets the message type to
RTM_GETLINK. This results in wrong reply being returned.

Fix this by using RTM_GETNEIGH instead.

Before:
$ bridge fdb show brport dummy0
Not RTM_NEWNEIGH: 00000158 00000010 00000002

After:
$ bridge fdb show brport dummy0
2a:0b:41:1c:92:d3 vlan 1 master br0 permanent
2a:0b:41:1c:92:d3 master br0 permanent
33:33:00:00:00:01 self permanent
01:00:5e:00:00:01 self permanent

Fixes: 05880354c2cf ("bridge: fdb: Fix filtering with strict checking disabled")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: LiLiang <liali@redhat.com>
Acked-by: David Ahern <dsahern@gmail.com>
Acked-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
bridge/fdb.c
include/libnetlink.h
lib/libnetlink.c