diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2022-03-21 17:59:27 +0100 | 
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2022-10-24 11:50:13 +0200 | 
| commit | 694fa86728fa1292246ac860c82b051e8d2dbf4a (patch) | |
| tree | b1d385773cf20c0ed29eb6d342563a7aad52fe8a /isisd/isisd.c | |
| parent | 6eb8da37b0e955d4cbe034d4d49743d4d5266101 (diff) | |
isisd: apply fast-reroute on an adjacency failure
When a adjacency falls down, the primary routes are not deleted on the
dataplane until the SPF is recomputed. Even the backup routes are
pre-installed on the dataplane, there is no fast-route optimization.
Reasons for an adjacency to come down are:
- BFD down
- Hello timer timeout
- User adjacency clear
Apply the backup route switchover for fast-reroute as soon an IS-IS
adjacency falls down before the first SPF re-computation. Pre-computed
backup routes are applied sooner.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd/isisd.c')
| -rw-r--r-- | isisd/isisd.c | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/isisd/isisd.c b/isisd/isisd.c index efea1e5d5e..b9cf336e81 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -3092,6 +3092,25 @@ void isis_area_verify_routes(struct isis_area *area)  		isis_spf_verify_routes(area, area->spftree[tree]);  } +void isis_area_switchover_routes(struct isis_area *area, int family, +				 union g_addr *nexthop_ip, ifindex_t ifindex, +				 int level) +{ +	int tree; + +	/* TODO SPFTREE_DSTSRC */ +	if (family == AF_INET) +		tree = SPFTREE_IPV4; +	else if (family == AF_INET6) +		tree = SPFTREE_IPV6; +	else +		return; + +	isis_spf_switchover_routes(area, area->spftree[tree], family, +				   nexthop_ip, ifindex, level); +} + +  static void area_resign_level(struct isis_area *area, int level)  {  	isis_area_invalidate_routes(area, level);  | 
