diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-07-17 10:00:32 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-07-17 10:00:32 -0400 | 
| commit | af80201876db00f339e2fbb9036942629aad9e67 (patch) | |
| tree | d4db79808e7e958b5ad4430d7f3cf186fdc37017 /zebra/zebra_rib.c | |
| parent | 33b1b8a04c2970a61ca38cbe0a016ffed394f329 (diff) | |
zebra: Further handle route replace semantics
When an upper level protocol is installing a route X that needs to be
route replaced and at the same time the same or another protocol installs a
different route that depends on route X for nexthop resolution can leave
us with a state where the route is not accepted because zebra is still
really early in the route replace semantics ( route X is still on the work
Queue to be processed ) then the dependent route would not be installed.
This came up in the bgp_default_originate test cases frequently.
Further extendd the ROUTE_ENTR_ROUTE_REPLACING flag to cover this case
as well.  This has come up because the early route processing queueing
that was implemented late last year.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 93b33c9abd..a5e036fe48 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2824,8 +2824,13 @@ static void process_subq_early_route_add(struct zebra_early_route *ere)  	rib_addnode(rn, re, 1);  	/* Free implicit route.*/ -	if (same) +	if (same) { +		rib_dest_t *dest = rn->info; + +		if (same == dest->selected_fib) +			SET_FLAG(same->status, ROUTE_ENTRY_ROUTE_REPLACING);  		rib_delnode(rn, same); +	}  	/* See if we can remove some RE entries that are queued for  	 * removal, but won't be considered in rib processing.  | 
