mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
net: ndo_fdb_dump should report -EMSGSIZE to rtnl_fdb_dump.
When the send skbuff reaches the end, nlmsg_put and friends returns -EMSGSIZE but it is silently thrown away in ndo_fdb_dump. It is called within a for_each_netdev loop and the first fdb entry of a following netdev could fit in the remaining skbuff. This breaks the mechanism of cb->args[0] and idx to keep track of the entries that are already dumped, which results missing entries in bridge fdb show command. Signed-off-by: Minoura Makoto <minoura@valinux.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4c0b6eaf37
commit
472681d57a
4 changed files with 23 additions and 7 deletions
|
@ -1093,8 +1093,11 @@ int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
|
|||
.cb = cb,
|
||||
.idx = idx,
|
||||
};
|
||||
int err;
|
||||
|
||||
switchdev_port_obj_dump(dev, &dump.fdb.obj, switchdev_port_fdb_dump_cb);
|
||||
err = switchdev_port_obj_dump(dev, &dump.fdb.obj,
|
||||
switchdev_port_fdb_dump_cb);
|
||||
cb->args[1] = err;
|
||||
return dump.idx;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(switchdev_port_fdb_dump);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue