diff options
author | Isabella de Leon <ideleon@microsoft.com> | 2023-03-31 02:00:39 +0200 |
---|---|---|
committer | Isabella de Leon <ideleon@microsoft.com> | 2023-04-04 18:23:21 +0200 |
commit | 4b24eae01dc531b3145bcfb7965aec13a350d39e (patch) | |
tree | ad63bc83a948d3eca055d3f20e8d750290f33068 /isisd/isis_pdu.h | |
parent | isisd: Add log-pdu-drops CLI/YANG support (diff) | |
download | frr-4b24eae01dc531b3145bcfb7965aec13a350d39e.tar.xz frr-4b24eae01dc531b3145bcfb7965aec13a350d39e.zip |
isisd: Add log-pdu-drops log functionality
If log-pdu-drops is configured, create an INFO log that displays the PDU type and drop counts when a PDU drop is detected.
Example logs:
2023/03/30 23:54:59.749 ISIS: [VAS9N-1JNNR] PDU drop detected of type: P2P IIH. 1 Total Drops; 0 L1 IIH drops; 0 L2 IIH drops; 1 P2P IIH drops; 0 L1 LSP drops; 0 L2 LSP drops; 0 FS LSP drops; 0 L1 CSNP drops; 0 L2 CSNP drops; 0 L1 PSNP drops; 0 L2 PSNP drops.
2023/03/30 23:54:59.848 ISIS: [VAS9N-1JNNR] PDU drop detected of type: P2P IIH. 2 Total Drops; 0 L1 IIH drops; 0 L2 IIH drops; 2 P2P IIH drops; 0 L1 LSP drops; 0 L2 LSP drops; 0 FS LSP drops; 0 L1 CSNP drops; 0 L2 CSNP drops; 0 L1 PSNP drops; 0 L2 PSNP drops.
Code changes:
Add a new PDU counter function that increments the drop counter and runs the logging functionality if log-pdu-drops is configured.
Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
Diffstat (limited to 'isisd/isis_pdu.h')
-rw-r--r-- | isisd/isis_pdu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/isisd/isis_pdu.h b/isisd/isis_pdu.h index ccd89a70f..5303c61d3 100644 --- a/isisd/isis_pdu.h +++ b/isisd/isis_pdu.h @@ -206,4 +206,6 @@ void send_lsp(struct isis_circuit *circuit, void fill_fixed_hdr(uint8_t pdu_type, struct stream *stream); int send_hello(struct isis_circuit *circuit, int level); int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa); +void isis_log_pdu_drops(struct isis_area *area, const char *pdu_type); + #endif /* _ZEBRA_ISIS_PDU_H */ |