summaryrefslogtreecommitdiff
path: root/isisd/isis_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r--isisd/isis_cli.c53
1 files changed, 42 insertions, 11 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 4a598aa8c9..ee51e46858 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -2262,15 +2262,22 @@ void cli_show_ip_isis_threeway_shake(struct vty *vty,
/*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding
*/
-DEFPY_YANG(isis_hello_padding, isis_hello_padding_cmd, "[no] isis hello padding",
- NO_STR
- "IS-IS routing protocol\n"
- "Add padding to IS-IS hello packets\n"
- "Pad hello packets\n")
+DEFPY_YANG(isis_hello_padding, isis_hello_padding_cmd,
+ "[no] isis hello padding [during-adjacency-formation]$padding_type",
+ NO_STR
+ "IS-IS routing protocol\n"
+ "Type of padding for IS-IS hello packets\n"
+ "Pad hello packets\n"
+ "Add padding to hello packets during adjacency formation only.\n")
{
- nb_cli_enqueue_change(vty, "./frr-isisd:isis/hello/padding",
- NB_OP_MODIFY, no ? "false" : "true");
-
+ if (no) {
+ nb_cli_enqueue_change(vty, "./frr-isisd:isis/hello/padding",
+ NB_OP_MODIFY, "disabled");
+ } else {
+ nb_cli_enqueue_change(vty, "./frr-isisd:isis/hello/padding",
+ NB_OP_MODIFY,
+ padding_type ? padding_type : "always");
+ }
return nb_cli_apply_changes(vty, NULL);
}
@@ -2278,10 +2285,13 @@ void cli_show_ip_isis_hello_padding(struct vty *vty,
const struct lyd_node *dnode,
bool show_defaults)
{
- if (!yang_dnode_get_bool(dnode, NULL))
+ int hello_padding_type = yang_dnode_get_enum(dnode, NULL);
+ if (hello_padding_type == ISIS_HELLO_PADDING_DISABLED)
vty_out(vty, " no");
-
- vty_out(vty, " isis hello padding\n");
+ vty_out(vty, " isis hello padding");
+ if (hello_padding_type == ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION)
+ vty_out(vty, " during-adjacency-formation");
+ vty_out(vty, "\n");
}
/*
@@ -3016,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",
@@ -3280,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);