Message ID | 20210322182108.4121827-1-olteanv@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 6ab4c3117aec4e08007d9e971fa4133e1de1082d |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: bridge: don't notify switchdev for local FDB addresses | expand |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 22 Mar 2021 20:21:08 +0200 you wrote: > From: Vladimir Oltean <vladimir.oltean@nxp.com> > > As explained in this discussion: > https://lore.kernel.org/netdev/20210117193009.io3nungdwuzmo5f7@skbuf/ > > the switchdev notifiers for FDB entries managed to have a zero-day bug. > The bridge would not say that this entry is local: > > [...] Here is the summary with links: - [net] net: bridge: don't notify switchdev for local FDB addresses https://git.kernel.org/netdev/net/c/6ab4c3117aec You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c index b89503832fcc..1e24d9a2c9a7 100644 --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c @@ -128,6 +128,8 @@ br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type) { if (!fdb->dst) return; + if (test_bit(BR_FDB_LOCAL, &fdb->flags)) + return; switch (type) { case RTM_DELNEIGH: