From 562d7ef703f71862f709eb2c7b053b6681603bb1 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu, 15 Nov 2018 14:55:31 +0100 Subject: [PATCH] isisd: Fix behavior on reception of self-originated LSP We should only update and reflood our own LSPs when the received LSP is newer than the local copy. In all other cases, we should simply acknowledge it or resend our own LSP. Signed-off-by: Christian Franke --- isisd/isis_pdu.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 99041b0e61..2f18b98d3f 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -1011,19 +1011,26 @@ dontcheckadj: * is * "greater" than that held by S, ... */ - if (hdr.seqno > lsp->hdr.seqno) { + if (comp == LSP_NEWER) { /* 7.3.16.1 */ lsp_inc_seqno(lsp, hdr.seqno); - if (isis->debugs & DEBUG_UPDATE_PACKETS) + if (isis->debugs & DEBUG_UPDATE_PACKETS) { zlog_debug( "ISIS-Upd (%s): (2) re-originating LSP %s new seq 0x%08" PRIx32, circuit->area->area_tag, rawlspid_print(hdr.lsp_id), lsp->hdr.seqno); + } + lsp_flood(lsp, NULL); + } else if (comp == LSP_EQUAL) { + isis_tx_queue_del(circuit->tx_queue, lsp); + if (circuit->circ_type != CIRCUIT_T_BROADCAST) + ISIS_SET_FLAG(lsp->SSNflags, circuit); + } else { + isis_tx_queue_add(circuit->tx_queue, lsp, + TX_LSP_NORMAL); + ISIS_CLEAR_FLAG(lsp->SSNflags, circuit); } - /* If the received LSP is older or equal, - * resend the LSP which will act as ACK */ - lsp_flood(lsp, NULL); } else { /* 7.3.15.1 e) - This lsp originated on another system */ -- 2.39.5