From 16c2ab97f9ac49744f584284c36a53a749e81692 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Wed, 14 Nov 2018 18:54:59 +0100 Subject: [PATCH] isisd: Always consider purges as newer 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 --- isisd/isis_lsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index 38239d5919..9a57d0d0ac 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -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 -- 2.39.5