]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: apply fast-reroute when an interface falls down
authorLouis Scalbert <louis.scalbert@6wind.com>
Fri, 20 May 2022 13:28:59 +0000 (15:28 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Mon, 23 May 2022 13:31:34 +0000 (15:31 +0200)
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 <louis.scalbert@6wind.com>
isisd/isis_circuit.c

index 3bbdaac6498fe065e9bcd1b2e79aa061794b5e3e..6072d6bf741353deb6d0b1b0a9fe345dbf8cd8bc 100644 (file)
@@ -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);