summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_packet.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2021-09-07 16:47:09 +0200
committerGitHub <noreply@github.com>2021-09-07 16:47:09 +0200
commit12b5b2f9ff1248326010c54090bb1b2ac4896719 (patch)
treea46ae432169075a309d999ae9aee9f227927abb3 /ospfd/ospf_packet.c
parentMerge pull request #9552 from mobash-rasool/ospfv2-bug-fixes-03 (diff)
parentospfd: GR Conformance fix for Hello packet DR election (diff)
downloadfrr-12b5b2f9ff1248326010c54090bb1b2ac4896719.tar.xz
frr-12b5b2f9ff1248326010c54090bb1b2ac4896719.zip
Merge pull request #9551 from mobash-rasool/ospfv2-bug-fixes-04
ospfd: GR Conformance fix in Hello packet DR election
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r--ospfd/ospf_packet.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 000bbadc5..1efdfee3b 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -1081,6 +1081,25 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
return;
}
+ if (OSPF_GR_IS_ACTIVE_HELPER(nbr)) {
+ /* As per the GR Conformance Test Case 7.2. Section 3
+ * "Also, if X was the Designated Router on network segment S
+ * when the helping relationship began, Y maintains X as the
+ * Designated Router until the helping relationship is
+ * terminated."
+ * When I am helper for this neighbor, I should not trigger the
+ * ISM Events. Also Intentionally not setting the priority and
+ * other fields so that when the neighbor exits the Grace
+ * period, it can handle if there is any change before GR and
+ * after GR. */
+ if (IS_DEBUG_OSPF_GR)
+ zlog_debug(
+ "%s, Neighbor is under GR Restart, hence ignoring the ISM Events",
+ __PRETTY_FUNCTION__);
+
+ return;
+ }
+
/* If neighbor itself declares DR and no BDR exists,
cause event BackupSeen */
if (IPV4_ADDR_SAME(&nbr->address.u.prefix4, &hello->d_router))