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

zebra: Fix connected route deletion when multiple entry exists (backport #13340) #14587

Merged
merged 1 commit into from
Oct 13, 2023
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
7 changes: 4 additions & 3 deletions zebra/zebra_rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2849,8 +2849,8 @@ static void process_subq_early_route_delete(struct zebra_early_route *ere)

struct nexthop *nh = NULL;

if (ere->re->nhe)
nh = ere->re->nhe->nhg.nexthop;
if (ere->re_nhe)
nh = ere->re_nhe->nhg.nexthop;

/* Lookup same type route. */
RNODE_FOREACH_RE (rn, re) {
Expand All @@ -2868,7 +2868,8 @@ static void process_subq_early_route_delete(struct zebra_early_route *ere)
if (re->type == ZEBRA_ROUTE_KERNEL &&
re->metric != ere->re->metric)
continue;
if (re->type == ZEBRA_ROUTE_CONNECT && (rtnh = nh) &&
if (re->type == ZEBRA_ROUTE_CONNECT &&
(rtnh = re->nhe->nhg.nexthop) &&
rtnh->type == NEXTHOP_TYPE_IFINDEX && nh) {
if (rtnh->ifindex != nh->ifindex)
continue;
Expand Down
Loading