* [PATCH net] net: bridge: vlan: fix inverted default vlan notification
@ 2026-08-14 14:16 Nikolay Aleksandrov
2026-08-16 11:02 ` Ido Schimmel
0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Aleksandrov @ 2026-08-14 14:16 UTC (permalink / raw)
To: netdev
Cc: idosch, davem, edumazet, kuba, pabeni, horms, bridge,
Nikolay Aleksandrov
A notification should be emitted only when the vlan delete was successful
and not otherwise. The proper check is if br/nbp_vlan_delete returned 0.
Fixes: f545923b4a6b ("net: bridge: vlan: notify on vlan add/delete/change flags")
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
---
Found this issue while preparing some vlan code cleanups.
net/bridge/br_vlan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 31c1b2cf75d9..1e0e436629ec 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -1136,7 +1136,7 @@ int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid,
if (err)
goto out;
- if (br_vlan_delete(br, old_pvid))
+ if (!br_vlan_delete(br, old_pvid))
br_vlan_notify(br, NULL, old_pvid, 0, RTM_DELVLAN);
br_vlan_notify(br, NULL, pvid, 0, RTM_NEWVLAN);
__set_bit(0, changed);
@@ -1158,7 +1158,7 @@ int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid,
&vlchange, extack);
if (err)
goto err_port;
- if (nbp_vlan_delete(p, old_pvid))
+ if (!nbp_vlan_delete(p, old_pvid))
br_vlan_notify(br, p, old_pvid, 0, RTM_DELVLAN);
br_vlan_notify(p->br, p, pvid, 0, RTM_NEWVLAN);
__set_bit(p->port_no, changed);
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: bridge: vlan: fix inverted default vlan notification
2026-08-14 14:16 [PATCH net] net: bridge: vlan: fix inverted default vlan notification Nikolay Aleksandrov
@ 2026-08-16 11:02 ` Ido Schimmel
0 siblings, 0 replies; 2+ messages in thread
From: Ido Schimmel @ 2026-08-16 11:02 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: netdev, davem, edumazet, kuba, pabeni, horms, bridge
On Fri, Aug 14, 2026 at 05:16:40PM +0300, Nikolay Aleksandrov wrote:
> A notification should be emitted only when the vlan delete was successful
> and not otherwise. The proper check is if br/nbp_vlan_delete returned 0.
>
> Fixes: f545923b4a6b ("net: bridge: vlan: notify on vlan add/delete/change flags")
> Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-16 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 14:16 [PATCH net] net: bridge: vlan: fix inverted default vlan notification Nikolay Aleksandrov
2026-08-16 11:02 ` Ido Schimmel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox