Skip to content

Commit

Permalink
Merge pull request #8841 from volta-networks/fix_ospf6_bad_seqnum
Browse files Browse the repository at this point in the history
ospf6: Drop LSA with bad seqnumber
  • Loading branch information
donaldsharp authored Jun 19, 2021
2 parents 457d4ee + c5467a1 commit cd551a0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ospf6d/ospf6_flood.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,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);

Expand Down

0 comments on commit cd551a0

Please sign in to comment.