diff options
| author | rgirada <rgirada@vmware.com> | 2020-08-22 10:49:30 -0700 |
|---|---|---|
| committer | rgirada <rgirada@vmware.com> | 2020-09-22 00:02:37 -0700 |
| commit | df074ec33a0496d259b619bdcca77a394044aad6 (patch) | |
| tree | 45008be54aa70cf4dcfcbd5da459a361703faa26 /ospfd/ospf_interface.c | |
| parent | 5a77dd8feb62c42178cce9aea29e29ff49acc87c (diff) | |
ospfd: GR helper exit scenarios
Description:
The follwoing helper exit scenarios are handled.
1. Recv Max age grace LSA from RESTARTER.
2. Grace timer expiry.
3. Due to topo change if lsa check is enabled.
Signed-off-by: Rajesh Girada <rgirada@vmware.com>
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; |
