summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--isisd/isis_cli.c21
-rw-r--r--isisd/isis_nb.c7
-rw-r--r--isisd/isis_nb.h3
-rw-r--r--isisd/isis_nb_config.c17
-rw-r--r--isisd/isisd.h2
-rw-r--r--yang/frr-isisd.yang7
6 files changed, 57 insertions, 0 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 7e1bb9255c..ee51e46858 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -3026,6 +3026,26 @@ void cli_show_isis_log_adjacency(struct vty *vty, const struct lyd_node *dnode,
}
/*
+ * XPath: /frr-isisd:isis/instance/log-pdu-drops
+ */
+DEFPY_YANG(log_pdu_drops, log_pdu_drops_cmd, "[no] log-pdu-drops",
+ NO_STR "Log any dropped PDUs\n")
+{
+ nb_cli_enqueue_change(vty, "./log-pdu-drops", NB_OP_MODIFY,
+ no ? "false" : "true");
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_isis_log_pdu_drops(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
+{
+ if (!yang_dnode_get_bool(dnode, NULL))
+ vty_out(vty, " no");
+ vty_out(vty, " log-pdu-drops\n");
+}
+
+/*
* XPath: /frr-isisd:isis/instance/mpls/ldp-sync
*/
DEFPY(isis_mpls_ldp_sync, isis_mpls_ldp_sync_cmd, "mpls ldp-sync",
@@ -3290,6 +3310,7 @@ void isis_cli_init(void)
install_element(INTERFACE_NODE, &isis_ti_lfa_cmd);
install_element(ISIS_NODE, &log_adj_changes_cmd);
+ install_element(ISIS_NODE, &log_pdu_drops_cmd);
install_element(ISIS_NODE, &isis_mpls_ldp_sync_cmd);
install_element(ISIS_NODE, &no_isis_mpls_ldp_sync_cmd);
diff --git a/isisd/isis_nb.c b/isisd/isis_nb.c
index 7dc3a0eb3d..9141bfc46c 100644
--- a/isisd/isis_nb.c
+++ b/isisd/isis_nb.c
@@ -559,6 +559,13 @@ const struct frr_yang_module_info frr_isisd_info = {
},
},
{
+ .xpath = "/frr-isisd:isis/instance/log-pdu-drops",
+ .cbs = {
+ .cli_show = cli_show_isis_log_pdu_drops,
+ .modify = isis_instance_log_pdu_drops_modify,
+ },
+ },
+ {
.xpath = "/frr-isisd:isis/instance/mpls-te",
.cbs = {
.cli_show = cli_show_isis_mpls_te,
diff --git a/isisd/isis_nb.h b/isisd/isis_nb.h
index 480b2ce041..9a1f1f786f 100644
--- a/isisd/isis_nb.h
+++ b/isisd/isis_nb.h
@@ -196,6 +196,7 @@ int isis_instance_fast_reroute_level_2_remote_lfa_prefix_list_modify(
int isis_instance_fast_reroute_level_2_remote_lfa_prefix_list_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_log_adjacency_changes_modify(struct nb_cb_modify_args *args);
+int isis_instance_log_pdu_drops_modify(struct nb_cb_modify_args *args);
int isis_instance_mpls_te_create(struct nb_cb_create_args *args);
int isis_instance_mpls_te_destroy(struct nb_cb_destroy_args *args);
int isis_instance_mpls_te_router_address_modify(struct nb_cb_modify_args *args);
@@ -609,6 +610,8 @@ void cli_show_ip_isis_priority(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_log_adjacency(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
+void cli_show_isis_log_pdu_drops(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults);
void cli_show_isis_mpls_ldp_sync(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_mpls_ldp_sync_holddown(struct vty *vty,
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c
index 3817465a64..6a9133f20b 100644
--- a/isisd/isis_nb_config.c
+++ b/isisd/isis_nb_config.c
@@ -1830,6 +1830,23 @@ int isis_instance_log_adjacency_changes_modify(struct nb_cb_modify_args *args)
}
/*
+ * XPath: /frr-isisd:isis/instance/log-pdu-drops
+ */
+int isis_instance_log_pdu_drops_modify(struct nb_cb_modify_args *args)
+{
+ struct isis_area *area;
+ bool log = yang_dnode_get_bool(args->dnode, NULL);
+
+ if (args->event != NB_EV_APPLY)
+ return NB_OK;
+
+ area = nb_running_get_entry(args->dnode, NULL, true);
+ area->log_pdu_drops = log ? 1 : 0;
+
+ return NB_OK;
+}
+
+/*
* XPath: /frr-isisd:isis/instance/mpls-te
*/
int isis_instance_mpls_te_create(struct nb_cb_create_args *args)
diff --git a/isisd/isisd.h b/isisd/isisd.h
index 0b1f1cb620..e0f7ca882e 100644
--- a/isisd/isisd.h
+++ b/isisd/isisd.h
@@ -195,6 +195,8 @@ struct isis_area {
int ip_circuits;
/* logging adjacency changes? */
uint8_t log_adj_changes;
+ /* logging pdu drops? */
+ uint8_t log_pdu_drops;
/* multi topology settings */
struct list *mt_settings;
/* MPLS-TE settings */
diff --git a/yang/frr-isisd.yang b/yang/frr-isisd.yang
index 66ec6a410d..de925b4823 100644
--- a/yang/frr-isisd.yang
+++ b/yang/frr-isisd.yang
@@ -1594,6 +1594,13 @@ module frr-isisd {
"Log changes to the IS-IS adjacencies in this area.";
}
+ leaf log-pdu-drops {
+ type boolean;
+ default "false";
+ description
+ "Log any dropped PDUs in this area.";
+ }
+
container mpls-te {
presence "Present if MPLS-TE is enabled.";
description