]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rtnetlink: Fix regression in bridge VLAN configuration
authorIdo Schimmel <idosch@nvidia.com>
Wed, 9 Jun 2021 11:17:53 +0000 (14:17 +0300)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:48:16 +0000 (08:48 -0400)
commitba14e0b49388ef9f02787fe3dc719e0621169e64
treea799dc98f3f2bd518845803a4c6d1e6245cfdcdc
parent2f73448041bd0682d4b552cfd314ace66107f1ad
rtnetlink: Fix regression in bridge VLAN configuration

[ Upstream commit d2e381c4963663bca6f30c3b996fa4dbafe8fcb5 ]

Cited commit started returning errors when notification info is not
filled by the bridge driver, resulting in the following regression:

 # ip link add name br1 type bridge vlan_filtering 1
 # bridge vlan add dev br1 vid 555 self pvid untagged
 RTNETLINK answers: Invalid argument

As long as the bridge driver does not fill notification info for the
bridge device itself, an empty notification should not be considered as
an error. This is explained in commit 59ccaaaa49b5 ("bridge: dont send
notification when skb->len == 0 in rtnl_bridge_notify").

Fix by removing the error and add a comment to avoid future bugs.

Fixes: a8db57c1d285 ("rtnetlink: Fix missing error code in rtnl_bridge_notify()")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/rtnetlink.c