summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_packet.c
diff options
context:
space:
mode:
authorMobashshera Rasool <mrasool@vmware.com>2021-10-06 19:04:10 +0200
committerMobashshera Rasool <mrasool@vmware.com>2021-10-06 19:04:10 +0200
commit874a549d519d4cb9aaee327f45666cac2b34901d (patch)
treebbd9367d4bf691bb7dfd1ad25b67e50f28d770ed /ospfd/ospf_packet.c
parentMerge pull request #9745 from opensourcerouting/bfd-ospf-topo-improv (diff)
downloadfrr-874a549d519d4cb9aaee327f45666cac2b34901d.tar.xz
frr-874a549d519d4cb9aaee327f45666cac2b34901d.zip
ospfd: ospf nbr in full although mismatch in hello packet contents
Issue: =================== OSPF neighbors are not going down even after 10 mins when having a mismatch in hello and dead interval. First neighbors are formed and then a mismatch in the interval is created, it is observed that the neighbor is not going down. Root Cause Analysis: ==================== The event HelloReceived defined in RFC 2328 was named as PacketReceived and this event was scheduled whenever LS Update, LS Ack, LS Request, DD description packet or Hello packet is received. Although there is a mismatch in the Hello packet contents, the event PacketReceived gets triggered due to LS Update received and the dead timer gets reset and hence the neighbor was never going Down and remains FULL. Fix: ================== As per RFC 2328, the HelloReceived needs to be triggered only when valid OSPF Hello packet is received and not when other OSPF packets are received. Modified the function name as well. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r--ospfd/ospf_packet.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 1efdfee3b..1dcf93dcd 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -1031,7 +1031,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
old_state = nbr->state;
/* Add event to thread. */
- OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_PacketReceived);
+ OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_HelloReceived);
/* RFC2328 Section 9.5.1
If the router is not eligible to become Designated Router,
@@ -1375,9 +1375,6 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
UNSET_FLAG(dd->options, OSPF_OPTION_O);
}
- /* Add event to thread. */
- OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_PacketReceived);
-
if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL))
zlog_info(
"%s:Packet[DD]: Neighbor %pI4 state is %s, seq_num:0x%x, local:0x%x",
@@ -1620,9 +1617,6 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
return;
}
- /* Add event to thread. */
- OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_PacketReceived);
-
/* Neighbor State should be Exchange or later. */
if (nbr->state != NSM_Exchange && nbr->state != NSM_Loading
&& nbr->state != NSM_Full) {
@@ -1867,9 +1861,6 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
return;
}
- /* Add event to thread. */
- OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_PacketReceived);
-
/* Check neighbor state. */
if (nbr->state < NSM_Exchange) {
if (IS_DEBUG_OSPF(nsm, NSM_EVENTS))
@@ -2256,9 +2247,6 @@ static void ospf_ls_ack(struct ip *iph, struct ospf_header *ospfh,
return;
}
- /* Add event to thread. */
- OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_PacketReceived);
-
if (nbr->state < NSM_Exchange) {
if (IS_DEBUG_OSPF(nsm, NSM_EVENTS))
zlog_debug(