Skip to content

Commit

Permalink
nl_bridge: fix removing aged out neighbors from fdb
Browse files Browse the repository at this point in the history
When fixing moving neighbors between ports we removed the ifindex from
the filter neigh to find a neighbor at any port with the mac address.

But since we use the same neigh to construct the fdb delete message,
this caused the message to miss the ifindex, and the kernel was
rejecting the deletion. This resulting in us not updating out local
cache of known layer 2 neighbors, and failing to relearn them.

Fix this by just using the found entry from our local cache, n_lookup.

Fixes: a566d4c ("nl_bridge::fdb_timeout(): check ifindex of hit before deletion")
Signed-off-by: Jonas Gorski <[email protected]>
(cherry picked from commit 09bf1a6)
Signed-off-by: Jonas Gorski <[email protected]>
  • Loading branch information
KanjiMonster committed Nov 29, 2024
1 parent 6db4eda commit 0f061b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/netlink/nl_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ int nl_bridge::fdb_timeout(rtnl_link *br_link, uint16_t vid,
rtnl_link_get_ifindex(br_link)) {
// * remove l2 entry from kernel
nl_msg *msg = nullptr;
rtnl_neigh_build_delete_request(n.get(), NLM_F_REQUEST, &msg);
rtnl_neigh_build_delete_request(n_lookup.get(), NLM_F_REQUEST, &msg);
assert(msg);

// send the message and create new fdb entry
Expand Down

0 comments on commit 0f061b9

Please sign in to comment.