diff options
author | Nikolay Aleksandrov <nikolay@nvidia.com> | 2022-01-26 15:10:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-01 17:25:47 +0100 |
commit | 9ffc94a81b0f2b7db78a630b5ae1032a551619d6 (patch) | |
tree | 83f3ecbd11140ff96bc4c0e2c6ded33dc3bde2c2 /lib/test-string_helpers.c | |
parent | 869f1704f1c29debabde2fa2a12c30f90b81f86b (diff) |
net: bridge: vlan: fix single net device option dumping
[ Upstream commit dcb2c5c6ca9b9177f04abaf76e5a983d177c9414 ]
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: 8dcea187088b ("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>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions