diff options
| author | Russ White <russ@riw.us> | 2020-10-12 10:16:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-12 10:16:27 -0400 |
| commit | 7fabf208b0f4dca3b71b540d482e2565ba146466 (patch) | |
| tree | 28c5ad87971689830ae5f64b795f5d446ca769c6 /ospfd/ospf_interface.c | |
| parent | 17235eea31fa9e1b2bfa023c9e8bc8bece2cf7ca (diff) | |
| parent | caa1cd9eab47c4cc6647a830871693b79e431a7b (diff) | |
Merge pull request #6811 from rgirada/test_helper
ospfd: ospfv2 graceful restart helper support.
Diffstat (limited to 'ospfd/ospf_interface.c')
| -rw-r--r-- | ospfd/ospf_interface.c | 27 |
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; |
