Skip to content

Commit

Permalink
cnetlink: ignore locked fdb entries as well
Browse files Browse the repository at this point in the history
Treat locked fdb entries like they don't exist, so let check_ll_neigh()
also return false for them.

Signed-off-by: Jonas Gorski <[email protected]>
  • Loading branch information
KanjiMonster committed Feb 11, 2025
1 parent 9825df5 commit 559afbc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/netlink/cnetlink.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,13 @@ bool cnetlink::check_ll_neigh(rtnl_neigh *neigh) noexcept {
return false;
}

uint32_t ext_flags;
if (!rtnl_neigh_get_ext_flags(neigh, &ext_flags) &&
ext_flags & NTF_EXT_LOCKED) {
VLOG(1) << __FUNCTION__ << ": state is locked for neighour " << neigh;
return false;
}

return true;
}

Expand Down

0 comments on commit 559afbc

Please sign in to comment.