summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-01-25 16:46:32 +0200
committerGitHub <noreply@github.com>2024-01-25 16:46:32 +0200
commit9b9abe165981979c47e4a2326f092d7cf64df1ea (patch)
tree12f1de476c87800d91c61578e2dfbebb5d8f81de /zebra/zebra_rib.c
parent7d7f90a4870091b10fef9287cfee0edf96a9da4d (diff)
parent8d5ed65e0d8f8a06c0a3ba900996c7007020d6fd (diff)
Merge pull request #15224 from donaldsharp/selected_fib
zebra: Cleanup dest assignment
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 4b5f81a3df..9e89e32d5d 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2874,11 +2874,10 @@ static void process_subq_early_route_add(struct zebra_early_route *ere)
SET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
rib_addnode(rn, re, 1);
+ dest = rib_dest_from_rnode(rn);
/* Free implicit route.*/
if (same) {
- rib_dest_t *dest = rn->info;
-
- if (same == dest->selected_fib)
+ if (dest && same == dest->selected_fib)
SET_FLAG(same->status, ROUTE_ENTRY_ROUTE_REPLACING);
rib_delnode(rn, same);
}
@@ -2886,7 +2885,6 @@ static void process_subq_early_route_add(struct zebra_early_route *ere)
/* See if we can remove some RE entries that are queued for
* removal, but won't be considered in rib processing.
*/
- dest = rib_dest_from_rnode(rn);
RNODE_FOREACH_RE_SAFE (rn, re, same) {
if (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED)) {
/* If the route was used earlier, must retain it. */