]> git.proxmox.com Git - mirror_iproute2.git/commit
bridge: fdb: Use 'struct ndmsg' for FDB dumping
authorIdo Schimmel <idosch@mellanox.com>
Sun, 30 Dec 2018 17:14:54 +0000 (17:14 +0000)
committerDavid Ahern <dsahern@gmail.com>
Mon, 31 Dec 2018 00:56:34 +0000 (16:56 -0800)
commit66e8e73edc659cf09653487db2cb7eb4be25b575
tree626532ca36508bf5026b7a050eb6a25fdf0f8952
parent40fc8c2cecdda1f64ad98314fa379adbb6cee458
bridge: fdb: Use 'struct ndmsg' for FDB dumping

Since commit aea41afcfd6d ("ip bridge: Set NETLINK_GET_STRICT_CHK on
socket") iproute2 uses strict checking on kernels that support it. This
causes FDB dumping to fail [1], as iproute2 uses 'struct ifinfomsg'
whereas the kernel expects 'struct ndmsg'.

Note that with this change iproute2 continues to work on old kernels
that do not support strict checking, but contain the fix introduced in
kernel commit bd961c9bc664 ("rtnetlink: fix rtnl_fdb_dump() for ndmsg
header").

[1]
# bridge fdb show
[ 5365.137224] netlink: 4 bytes leftover after parsing attributes in process `bridge'.
Error: bytes leftover after parsing attributes.
Dump terminated

Fixes: aea41afcfd6d ("ip bridge: Set NETLINK_GET_STRICT_CHK on socket")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
bridge/fdb.c