From: Louis Scalbert Date: Fri, 20 May 2022 13:28:59 +0000 (+0200) Subject: isisd: apply fast-reroute when an interface falls down X-Git-Tag: base_8.4~257^2~10 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=62e458278b3d261f492ffeac7ed70b32272a43dd;p=matthieu%2Ffrr.git isisd: apply fast-reroute when an interface falls down Backup routes are sent to zebra by routing daemons such as isisd so that the dataplane can pre-install them with a lower priority. When an interface comes down, the associated primary routes are discarded by the dataplane and the backup ones take over. However, some dataplanes (e.g. Netlink ones) do not pre-install the backup routes. Associated prefixes have no next-hop until SPF is recomputed. Apply fast-reroute as soon as an interface falls down by sending route UPDATEs to zebra. Signed-off-by: Louis Scalbert --- diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index 3bbdaac649..6072d6bf74 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -1639,9 +1639,14 @@ static int isis_ifp_up(struct interface *ifp) static int isis_ifp_down(struct interface *ifp) { + afi_t afi; struct isis_circuit *circuit = ifp->info; if (circuit) { + for (afi = AFI_IP; afi <= AFI_IP6; afi++) + isis_circuit_switchover_routes( + circuit, afi == AFI_IP ? AF_INET : AF_INET6, + NULL, ifp->ifindex); isis_csm_state_change(IF_DOWN_FROM_Z, circuit, ifp); SET_FLAG(circuit->flags, ISIS_CIRCUIT_FLAPPED_AFTER_SPF);