Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nl_l3::del_l3_neigh_egress(): remove created VLAN as well #453

Merged
merged 1 commit into from
Dec 13, 2024
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
5 changes: 3 additions & 2 deletions src/netlink/nl_l3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ int nl_l3::del_l3_neigh_egress(struct rtnl_neigh *n) {
return -EINVAL;

uint16_t vid = vlan->get_vid(link.get());
auto tagged = !!rtnl_link_is_vlan(link.get());
auto s_mac = rtnl_link_get_addr(link.get());

if (nl->is_bridge_interface(ifindex)) {
Expand Down Expand Up @@ -688,6 +689,7 @@ int nl_l3::del_l3_neigh_egress(struct rtnl_neigh *n) {
}

ifindex = nl->get_ifindex_by_port_id(portid);
link = nl->get_link_by_ifindex(ifindex);
}
}

Expand All @@ -700,8 +702,7 @@ int nl_l3::del_l3_neigh_egress(struct rtnl_neigh *n) {
<< ": failed to remove l3 egress ifindex=" << ifindex
<< " vid=" << vid;
}

return rv;
return vlan->remove_vlan(link.get(), vid, tagged);
}

int nl_l3::add_l3_neigh(struct rtnl_neigh *n) {
Expand Down
Loading