diff options
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/isis_northbound.c | 22 | ||||
-rw-r--r-- | isisd/isis_pdu.c | 7 | ||||
-rw-r--r-- | isisd/isisd.h | 3 |
3 files changed, 32 insertions, 0 deletions
diff --git a/isisd/isis_northbound.c b/isisd/isis_northbound.c index f76d85cc3..9d7371c9c 100644 --- a/isisd/isis_northbound.c +++ b/isisd/isis_northbound.c @@ -2913,6 +2913,28 @@ void isis_notif_seqno_skipped(const struct isis_circuit *circuit, nb_notification_send(xpath, arguments); } +/* + * XPath: + * /frr-isisd:own-lsp-purge + */ +void isis_notif_own_lsp_purge(const struct isis_circuit *circuit, + const char *lsp_id) +{ + const char *xpath = "/frr-isisd:own-lsp-purge"; + struct list *arguments = yang_data_list_new(); + char xpath_arg[XPATH_MAXLEN]; + struct yang_data *data; + struct isis_area *area = circuit->area; + + notif_prep_instance_hdr(xpath, area, "default", arguments); + notif_prepr_iface_hdr(xpath, circuit, arguments); + snprintf(xpath_arg, sizeof(xpath_arg), "%s/lsp-id", xpath); + data = yang_data_new_string(xpath_arg, lsp_id); + listnode_add(arguments, data); + + nb_notification_send(xpath, arguments); +} + /* clang-format off */ const struct frr_yang_module_info frr_isisd_info = { .name = "frr-isisd", diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index a5ec27e47..330da9b21 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -1117,6 +1117,13 @@ dontcheckadj: circuit->area->area_tag, rawlspid_print(hdr.lsp_id), lsp->hdr.seqno); + } else { + /* our own LSP with 0 remaining life time */ +#ifndef FABRICD + /* send northbound notification */ + isis_notif_own_lsp_purge( + circuit, rawlspid_print(hdr.lsp_id)); +#endif /* ifndef FABRICD */ } } goto out; diff --git a/isisd/isisd.h b/isisd/isisd.h index 9d0d7f690..fb879395c 100644 --- a/isisd/isisd.h +++ b/isisd/isisd.h @@ -261,6 +261,9 @@ extern void isis_notif_lsp_error(const struct isis_circuit *circuit, uint32_t offset, uint8_t tlv_type); extern void isis_notif_seqno_skipped(const struct isis_circuit *circuit, const char *lsp_id); +extern void isis_notif_own_lsp_purge(const struct isis_circuit *circuit, + const char *lsp_id); + /* Master of threads. */ extern struct thread_master *master; |