summaryrefslogtreecommitdiff
path: root/isisd/isis_circuit.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2022-05-20 15:29:21 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2022-05-24 10:05:49 +0200
commit08e4960ab48c1c9e4227e40b286d5cbc4ac581f0 (patch)
treeaeafcaad82ddf15f69d3c080ee02cc869264115c /isisd/isis_circuit.c
parent62e458278b3d261f492ffeac7ed70b32272a43dd (diff)
isisd: avoid fast-reroute on down adjacency when the interface is down
When an IS-IS interface is coming down, fast-reroute may be triggered twice: a first time after the detection of the interface down event and a second time after the detection of the adjacency down (because of the expiration of the ISIS Hello or BFD timers). Avoid a BFD down event from running fast-reroute another time if the interface was already detected down. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd/isis_circuit.c')
-rw-r--r--isisd/isis_circuit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 6072d6bf74..4717f1b0e3 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -1631,8 +1631,10 @@ static int isis_ifp_up(struct interface *ifp)
{
struct isis_circuit *circuit = ifp->info;
- if (circuit)
+ if (circuit) {
+ UNSET_FLAG(circuit->flags, ISIS_CIRCUIT_IF_DOWN_FROM_Z);
isis_csm_state_change(IF_UP_FROM_Z, circuit, ifp);
+ }
return 0;
}
@@ -1643,6 +1645,7 @@ static int isis_ifp_down(struct interface *ifp)
struct isis_circuit *circuit = ifp->info;
if (circuit) {
+ SET_FLAG(circuit->flags, ISIS_CIRCUIT_IF_DOWN_FROM_Z);
for (afi = AFI_IP; afi <= AFI_IP6; afi++)
isis_circuit_switchover_routes(
circuit, afi == AFI_IP ? AF_INET : AF_INET6,