summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Winter <mwinter@opensourcerouting.org>2021-07-23 09:32:55 +0200
committerGitHub <noreply@github.com>2021-07-23 09:32:55 +0200
commit09cfdbff2b4b1fe66ef96310d77398191c6e5807 (patch)
tree4d1577402fc8100c7c448ba2f0df9fdc8add6446
parent2eb901d6ecbe517a1a7086a0d12895f97d61803e (diff)
parentd15dd81e96d0142a14287cf3f01997cd18095ab9 (diff)
Merge pull request #9123 from FRRouting/mergify/bp/stable/8.0/pr-8841
ospf6: Drop LSA with bad seqnumber (backport #8841)
-rw-r--r--ospf6d/ospf6_flood.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c
index 8e3e35d6bd..726ee96b9e 100644
--- a/ospf6d/ospf6_flood.c
+++ b/ospf6d/ospf6_flood.c
@@ -790,6 +790,18 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from,
ismore_recent = 1;
assert(from);
+ /* if we receive a LSA with invalid seqnum drop it */
+ if (ntohl(lsa_header->seqnum) - 1 == OSPF_MAX_SEQUENCE_NUMBER) {
+ if (IS_OSPF6_DEBUG_EXAMIN_TYPE(lsa_header->type)) {
+ zlog_debug(
+ "received lsa [%s Id:%pI4 Adv:%pI4] with invalid seqnum 0x%x, ignore",
+ ospf6_lstype_name(lsa_header->type),
+ &lsa_header->id, &lsa_header->adv_router,
+ ntohl(lsa_header->seqnum));
+ }
+ return;
+ }
+
/* make lsa structure for received lsa */
new = ospf6_lsa_create(lsa_header);