Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/netlink/nl_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -568,14 +568,18 @@ void nl_bridge::update_vlans(rtnl_link *old_link, rtnl_link *new_link) {
// the PVID is already being handled outside of the loop
vlan->remove_bridge_vlan(_link, vid, false, !egress_untagged);

// remove all fdb entries by us
nl_fdb_flush ff;

auto ret = ff.flush_fdb(rtnl_link_get_ifindex(_link), vid,
NTF_MASTER | NTF_EXT_LEARNED);
if (ret < 0)
LOG(WARNING) << __FUNCTION__ << ": failed to flush vid=" << vid
<< " on port " << _link;
// only flush on updating interfaces, kernel will take of it when
// removing from the bridge (new_link is a nullptr)
if (new_link) {
// remove all fdb entries by us
Comment thread
rubensfig marked this conversation as resolved.
nl_fdb_flush ff;

auto ret = ff.flush_fdb(rtnl_link_get_ifindex(_link), vid,
NTF_MASTER | NTF_EXT_LEARNED);
if (ret < 0)
LOG(WARNING) << __FUNCTION__ << ": failed to flush vid=" << vid
<< " on port " << _link;
}
}
}
}
Expand Down