Skip to content

nl_bridge: do not try to flush fdb on removed interfaces#487

Merged
rubensfig merged 1 commit intomainfrom
jogo_no_flush_on_bridge_removal
Mar 4, 2026
Merged

nl_bridge: do not try to flush fdb on removed interfaces#487
rubensfig merged 1 commit intomainfrom
jogo_no_flush_on_bridge_removal

Conversation

@KanjiMonster
Copy link
Contributor

When removing a VLAN from a bridge port, we flush the fdb entries from the kernel. When removing a port form the bridge, we also remove all VLANs from that port.

When we try to flush the fdb for that port, the kernel refuses to do so since the port is not a bridge member anymore, and returns an error, causing baseboxd to treat this as fatal.

Since removing a port from a bridge will automatically delete all fdb entries for all vlans, there is no need for us to manually delete them, so skip flushing the fdb if we are in the interface removal path, i.e. new_link is a nullptr.

@KanjiMonster KanjiMonster requested a review from rubensfig March 4, 2026 12:07
When removing a VLAN from a bridge port, we flush the fdb entries from
the kernel. When removing a port form the bridge, we also remove all
VLANs from that port.

When we try to flush the fdb for that port, the kernel refuses to do so
since the port is not a bridge member anymore, and returns an error,
causing baseboxd to treat this as fatal.

Since removing a port from a bridge will automatically delete all fdb
entries for all vlans, there is no need for us to manually delete them,
so skip flushing the fdb if we are in the interface removal path, i.e.
new_link is a nullptr.

Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
@KanjiMonster KanjiMonster force-pushed the jogo_no_flush_on_bridge_removal branch from d3bf84d to 47f1c6f Compare March 4, 2026 12:24
Copy link
Contributor

@rubensfig rubensfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on AG7648, LGTM.

@rubensfig rubensfig merged commit 584fc5d into main Mar 4, 2026
4 checks passed
@rubensfig rubensfig deleted the jogo_no_flush_on_bridge_removal branch March 4, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants