diff options
author | rgirada <rgirada@vmware.com> | 2020-08-22 14:08:01 +0200 |
---|---|---|
committer | rgirada <rgirada@vmware.com> | 2020-09-22 09:02:37 +0200 |
commit | 5a77dd8feb62c42178cce9aea29e29ff49acc87c (patch) | |
tree | 4c86de97f1d3297750e1c4cb054b4c3eb317a5b1 /ospfd/ospf_packet.c | |
parent | ospfd: Grace LSA processing (diff) | |
download | frr-5a77dd8feb62c42178cce9aea29e29ff49acc87c.tar.xz frr-5a77dd8feb62c42178cce9aea29e29ff49acc87c.zip |
ospfd: GR Helper functionality changes
Description:
1. Skipping inactivity timer during graceful restart to make
the RESTARTER active even after dead timer expiry.
2. Handling HELPER on unplanned outages.
Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 61aae695b..160982a23 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -54,6 +54,7 @@ #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 @@ -1058,7 +1059,16 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh, 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; @@ -4262,6 +4272,12 @@ void ospf_ls_ack_send(struct ospf_neighbor *nbr, struct ospf_lsa *lsa) { 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; |