]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Always consider purges as newer
authorChristian Franke <chris@opensourcerouting.org>
Wed, 14 Nov 2018 17:54:59 +0000 (18:54 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Thu, 15 Nov 2018 14:06:40 +0000 (15:06 +0100)
When receiving an LSP with same sequence number but different
checksum as in the local database, we would always treat it as
newer than the local LSP.

That behavior is incorrect if the local LSP is indeed a purged
LSP waiting for age-out and the received one is not.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
isisd/isis_lsp.c

index 38239d5919ccc9fec89aaa1981d810da63e994a9..9a57d0d0ac2f522cba654e01bb40e9ac10873257 100644 (file)
@@ -253,7 +253,8 @@ int lsp_compare(char *areatag, struct isis_lsp *lsp, uint32_t seqno,
        if (seqno > lsp->hdr.seqno
            || (seqno == lsp->hdr.seqno
                && ((lsp->hdr.rem_lifetime != 0 && rem_lifetime == 0)
-                   || lsp->hdr.checksum != checksum))) {
+                   || (lsp->hdr.checksum != checksum
+                       && lsp->hdr.rem_lifetime)))) {
                if (isis->debugs & DEBUG_SNP_PACKETS) {
                        zlog_debug(
                                "ISIS-Snp (%s): Compare LSP %s seq 0x%08" PRIx32