summaryrefslogtreecommitdiff
path: root/proto/ospf/iface.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-06-30 20:12:59 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-06-30 21:30:41 +0200
commit1a2ad348f660b150265f6df759a07de8a2b6de2f (patch)
treed64846d56a79178a34e865440b3b87d970c13fd4 /proto/ospf/iface.c
parent8a68316eb96be1fecf91ca395f3321aa99997ad2 (diff)
OSPF: Support for graceful restart
Implement OSPFv2 (RFC 3623) and OSPFv3 (RFC 5187) graceful restart, for both restarting and helper sides. Graceful restart is initiated by 'graceful down' command.
Diffstat (limited to 'proto/ospf/iface.c')
-rw-r--r--proto/ospf/iface.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index 388c91c8..f5c69199 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -772,6 +772,14 @@ ospf_iface_reconfigure(struct ospf_iface *ifa, struct ospf_iface_patt *new)
ifa->cf = new;
ifa->marked = 0;
+ /* Cancel GR peers if GR is disabled */
+ if (!p->gr_mode && p->gr_count)
+ {
+ struct ospf_neighbor *n, *nx;
+ WALK_LIST_DELSAFE(n, nx, ifa->neigh_list)
+ if (n->gr_active)
+ ospf_neigh_cancel_graceful_restart(n);
+ }
/* HELLO TIMER */
if (ifa->helloint != new->helloint)