]> git.proxmox.com Git - mirror_frr.git/commitdiff
isisd: Fix behavior on reception of self-originated LSP
authorChristian Franke <chris@opensourcerouting.org>
Thu, 15 Nov 2018 13:55:31 +0000 (14:55 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Thu, 15 Nov 2018 14:06:40 +0000 (15:06 +0100)
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 <chris@opensourcerouting.org>
isisd/isis_pdu.c

index 99041b0e61c7e2289c5a5b190325b2dcaecdce48..2f18b98d3f2d6c9ba9f8a7fd9c76c341a4593d90 100644 (file)
@@ -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 */