summaryrefslogtreecommitdiff
path: root/isisd/isis_cli.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2023-03-20 17:00:57 -0400
committerGitHub <noreply@github.com>2023-03-20 17:00:57 -0400
commit55cf5ea672580193a9d419486b7bda2df1186cd4 (patch)
tree49f2010bac3e51ac41a9a3fbd5d633016fabe2f6 /isisd/isis_cli.c
parentc8cba1b88c952517ebe7f2ab2262a6ffb5499c0a (diff)
parent06fbbf293583f5ca647762c49c78ad27192f26dd (diff)
Merge pull request #12688 from dorDiogo/isis_hello_padding_sometimes
isisd: Add support for IS-IS hello padding during-adjacency-formation
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r--isisd/isis_cli.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 4a598aa8c9..7e1bb9255c 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");
}
/*