IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
ospf_get_name(nbr->oi->ospf));
- OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_InactivityTimer);
+ /* Dont trigger NSM_InactivityTimer event , if the current
+ * router acting as HELPER for this neighbour.
+ */
+ if (!OSPF_GR_IS_ACTIVE_HELPER(nbr))
+ OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_InactivityTimer);
+ else if (IS_DEBUG_OSPF_GR_HELPER)
+ zlog_debug(
+ "%s, Acting as HELPER for this neighbour, So inactivitytimer event will not be fired.",
+ __PRETTY_FUNCTION__);
return 0;
}
lookup_msg(ospf_nsm_state_msg, old_state, NULL),
lookup_msg(ospf_nsm_state_msg, state, NULL));
- ospf_router_lsa_update_area(oi->area);
+ /* Dont originate router LSA if the current
+ * router is acting as a HELPER for this neighbour.
+ */
+ if (!OSPF_GR_IS_ACTIVE_HELPER(nbr))
+ ospf_router_lsa_update_area(oi->area);
if (oi->type == OSPF_IFTYPE_VIRTUALLINK) {
vl_area = ospf_area_lookup_by_area_id(
ospf_router_lsa_update_area(vl_area);
}
- /* Originate network-LSA. */
- if (oi->state == ISM_DR) {
- if (oi->network_lsa_self && oi->full_nbrs == 0) {
- ospf_lsa_flush_area(oi->network_lsa_self,
- oi->area);
- ospf_lsa_unlock(&oi->network_lsa_self);
- oi->network_lsa_self = NULL;
- } else
- ospf_network_lsa_update(oi);
+ /* Dont originate/flush network LSA if the current
+ * router is acting as a HELPER for this neighbour.
+ */
+ if (!OSPF_GR_IS_ACTIVE_HELPER(nbr)) {
+ /* Originate network-LSA. */
+ if (oi->state == ISM_DR) {
+ if (oi->network_lsa_self
+ && oi->full_nbrs == 0) {
+ ospf_lsa_flush_area(
+ oi->network_lsa_self, oi->area);
+ ospf_lsa_unlock(&oi->network_lsa_self);
+ oi->network_lsa_self = NULL;
+ } else
+ ospf_network_lsa_update(oi);
+ }
}
}
#include "ospfd/ospf_dump.h"
#include "ospfd/ospf_errors.h"
#include "ospfd/ospf_zebra.h"
+#include "ospfd/ospf_gr_helper.h"
/*
* OSPF Fragmentation / fragmented writes
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_TwoWayReceived);
nbr->options |= hello->options;
} else {
- OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_OneWayReceived);
+ /* If the router is DR_OTHER, RESTARTER will not wait
+ * until it receives the hello from it if it receives
+ * from DR and BDR.
+ * So, helper might receives ONW_WAY hello from
+ * RESTARTER. So not allowing to change the state if it
+ * receives one_way hellow when it acts as HELPER for
+ * that specific neighbor.
+ */
+ if (!OSPF_GR_IS_ACTIVE_HELPER(nbr))
+ OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_OneWayReceived);
/* Set neighbor information. */
nbr->priority = hello->priority;
nbr->d_router = hello->d_router;
{
struct ospf_interface *oi = nbr->oi;
+ if (IS_GRACE_LSA(lsa)) {
+ if (IS_DEBUG_OSPF_GR_HELPER)
+ zlog_debug("%s, Sending GRACE ACK to Restarter.",
+ __PRETTY_FUNCTION__);
+ }
+
if (listcount(oi->ls_ack_direct.ls_ack) == 0)
oi->ls_ack_direct.dst = nbr->address.u.prefix4;