summaryrefslogtreecommitdiffstats
path: root/isisd/isis_pdu.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-06-07 11:08:55 +0200
committerChristian Franke <chris@opensourcerouting.org>2018-09-05 11:38:13 +0200
commitdf0ba689ebf4960812bb4c65ea1b44236627f6ba (patch)
treef3003dbce500bbe39d2be242641e0aa1d52da382 /isisd/isis_pdu.c
parentfabricd: Remove processing for unneded PDUs and TLVs (diff)
downloadfrr-df0ba689ebf4960812bb4c65ea1b44236627f6ba.tar.xz
frr-df0ba689ebf4960812bb4c65ea1b44236627f6ba.zip
fabricd: trigger CSNP after flooding scope LSP has been received
Have fabricd send out a CSNP whenever a circuit scoped LSP is received, and log a warning if the CSNP showed resynchronization was necessary. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_pdu.c')
-rw-r--r--isisd/isis_pdu.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c
index d5e9704b0..fc9ff5143 100644
--- a/isisd/isis_pdu.c
+++ b/isisd/isis_pdu.c
@@ -1044,7 +1044,7 @@ dontcheckadj:
if (!lsp0) {
zlog_debug(
"Got lsp frag, while zero lsp not in database");
- return ISIS_OK;
+ goto out;
}
}
/* i */
@@ -1089,6 +1089,10 @@ dontcheckadj:
retval = ISIS_OK;
out:
+ if (circuit_scoped) {
+ fabricd_trigger_csnp(circuit->area);
+ }
+
isis_free_tlvs(tlvs);
return retval;
}
@@ -1243,6 +1247,8 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
}
}
+ bool resync_needed = false;
+
/* 7.3.15.2 b) Actions on LSP_ENTRIES reported */
for (struct isis_lsp_entry *entry = entry_head; entry;
entry = entry->next) {
@@ -1279,6 +1285,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
/* if (circuit->circ_type !=
* CIRCUIT_T_BROADCAST) */
isis_tx_queue_del(circuit->tx_queue, lsp);
+ resync_needed = true;
}
}
} else {
@@ -1313,6 +1320,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
lsp_set_all_srmflags(lsp, false);
ISIS_SET_FLAG(lsp->SSNflags, circuit);
+ resync_needed = true;
}
}
}
@@ -1345,12 +1353,16 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
/* on remaining LSPs we set SRM (neighbor knew not of) */
for (ALL_LIST_ELEMENTS_RO(lsp_list, node, lsp)) {
isis_tx_queue_add(circuit->tx_queue, lsp, TX_LSP_NORMAL);
+ resync_needed = true;
}
/* lets free it */
list_delete_and_null(&lsp_list);
}
+ if (fabricd_initial_sync_is_complete(circuit->area) && resync_needed)
+ zlog_warn("OpenFabric: Needed to resync LSPDB using CSNP!\n");
+
retval = ISIS_OK;
out:
isis_free_tlvs(tlvs);