summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 6bfdb1e9e0..3d2c28b1e4 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -796,9 +796,36 @@ int ospf_if_up(struct ospf_interface *oi)
int ospf_if_down(struct ospf_interface *oi)
{
+ struct ospf *ospf;
+
if (oi == NULL)
return 0;
+ ospf = oi->ospf;
+
+ /* Cease the HELPER role for all the neighbours
+ * of this interface.
+ */
+ if (ospf->is_helper_supported) {
+ struct route_node *rn = NULL;
+
+ if (ospf_interface_neighbor_count(oi)) {
+ for (rn = route_top(oi->nbrs); rn;
+ rn = route_next(rn)) {
+ struct ospf_neighbor *nbr = NULL;
+
+ if (!rn->info)
+ continue;
+
+ nbr = rn->info;
+
+ if (OSPF_GR_IS_ACTIVE_HELPER(nbr))
+ ospf_gr_helper_exit(
+ nbr, OSPF_GR_HELPER_TOPO_CHG);
+ }
+ }
+ }
+
OSPF_ISM_EVENT_EXECUTE(oi, ISM_InterfaceDown);
/* delete position in router LSA */
oi->lsa_pos_beg = 0;