]> git.proxmox.com Git - mirror_frr.git/commitdiff
isisd: implement the 'corrupted-lsp-detected' notification
authorEmanuele Di Pascale <emanuele@voltanet.io>
Wed, 14 Nov 2018 14:06:43 +0000 (15:06 +0100)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Tue, 18 Dec 2018 14:24:46 +0000 (15:24 +0100)
However it is not currently called anywhere, as I could not find a
place in the code where it felt appropriate.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
isisd/isis_northbound.c
isisd/isisd.h

index d5eac45eb94fa44796d3b87ca004848384567f40..136fec23757bf64beb0da4c08b8b6662447be324 100644 (file)
@@ -2550,6 +2550,25 @@ void isis_notif_if_state_change(const struct isis_circuit *circuit, bool down)
        nb_notification_send(xpath, arguments);
 }
 
+/*
+ * XPath:
+ * /frr-isisd:corrupted-lsp-detected
+ */
+void isis_notif_corrupted_lsp(const struct isis_area *area, const char *lsp_id)
+{
+       const char *xpath = "/frr-isisd:corrupted-lsp-detected";
+       struct list *arguments = yang_data_list_new();
+       char xpath_arg[XPATH_MAXLEN];
+       struct yang_data *data;
+
+       notif_prep_instance_hdr(xpath, area, "default", 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",
index 05a25e660288dcf0aa5b99dd7ad8b93aa6e3f12c..12d3f2bec21fce98e4502353563565f584527f05 100644 (file)
@@ -227,6 +227,8 @@ extern void isis_notif_lsp_too_large(const struct isis_circuit *circuit,
                                     uint32_t pdu_size, const char *lsp_id);
 extern void isis_notif_if_state_change(const struct isis_circuit *circuit,
                                       bool down);
+extern void isis_notif_corrupted_lsp(const struct isis_area *area,
+                                    const char *lsp_id); /* currently unused */
 /* Master of threads. */
 extern struct thread_master *master;