Skip to content

Commit

Permalink
Merge pull request #14588 from FRRouting/mergify/bp/stable/9.0/pr-13340
Browse files Browse the repository at this point in the history
zebra: Fix connected route deletion when multiple entry exists (backport #13340)
  • Loading branch information
donaldsharp authored Oct 13, 2023
2 parents 03fc69d + f9e82d1 commit 633a030
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions zebra/zebra_rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2948,8 +2948,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 @@ -2967,7 +2967,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

0 comments on commit 633a030

Please sign in to comment.