You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
net: bridge: vlan: fix single net device option dumping
[ Upstream commitdcb2c5c6ca] When dumping vlan options for a single net device we send the same entries infinitely because user-space expects a 0 return at the end but we keep returning skb->len and restarting the dump on retry. Fix it by returning the value from br_vlan_dump_dev() if it completed or there was an error. The only case that must return skb->len is when the dump was incomplete and needs to continue (-EMSGSIZE). Reported-by: Benjamin Poirier <bpoirier@nvidia.com> Fixes:8dcea18708("net: bridge: vlan: add rtm definitions and dump support") Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
869f1704f1
commit
9ffc94a81b
@@ -1873,7 +1873,8 @@ static int br_vlan_rtm_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
goto out_err;
|
||||
}
|
||||
err = br_vlan_dump_dev(dev, skb, cb, dump_flags);
|
||||
if (err && err != -EMSGSIZE)
|
||||
/* if the dump completed without an error we return 0 here */
|
||||
if (err != -EMSGSIZE)
|
||||
goto out_err;
|
||||
} else {
|
||||
for_each_netdev_rcu(net, dev) {
|
||||
|
||||
Reference in New Issue
Block a user