diff options
author | Dinesh Dutt <ddutt@cumulusnetworks.com> | 2013-08-24 10:00:44 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2013-11-08 03:15:43 +0100 |
commit | 3b220289a4d0da4539d965ca71e9479d68c87b11 (patch) | |
tree | 232f6c56c5c12cf292937f7b21b002ef63b8c7e3 /ospf6d/ospf6_flood.c | |
parent | ospf6d: add overload support (diff) | |
download | frr-3b220289a4d0da4539d965ca71e9479d68c87b11.tar.xz frr-3b220289a4d0da4539d965ca71e9479d68c87b11.zip |
ospf6d: handle seqnum wrapping
Signed-off-by: Shrijeet Mukherjee <shm at cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
[DL: mechanical adjust to rebase]
[DL: adjust to removal of timerwheel code]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_flood.c')
-rw-r--r-- | ospf6d/ospf6_flood.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index e02a432f9..7f6b2850c 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -230,6 +230,25 @@ ospf6_install_lsa (struct ospf6_lsa *lsa) else lsa->expire = NULL; + if (OSPF6_LSA_IS_SEQWRAP(lsa) && + ! (CHECK_FLAG(lsa->flag,OSPF6_LSA_SEQWRAPPED) && + lsa->header->seqnum == htonl(OSPF_MAX_SEQUENCE_NUMBER))) + { + if (IS_OSPF6_DEBUG_EXAMIN_TYPE (lsa->header->type)) + zlog_debug("lsa install wrapping: sequence 0x%x", + ntohl(lsa->header->seqnum)); + SET_FLAG(lsa->flag, OSPF6_LSA_SEQWRAPPED); + /* in lieu of premature_aging, since we do not want to recreate this lsa + * and/or mess with timers etc, we just want to wrap the sequence number + * and reflood the lsa before continuing. + * NOTE: Flood needs to be called right after this function call, by the + * caller + */ + lsa->header->seqnum = htonl (OSPF_MAX_SEQUENCE_NUMBER); + lsa->header->age = htons (OSPF_LSA_MAXAGE); + ospf6_lsa_checksum (lsa->header); + } + /* actually install */ lsa->installed = now; ospf6_lsdb_add (lsa, lsa->lsdb); |