summaryrefslogtreecommitdiff
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-03-01 10:48:05 -0500
committerMark Stapp <mjs@voltanet.io>2021-04-07 15:38:09 -0400
commitaef1d5404fabe113e66bbc49499a7eb2b96aaab4 (patch)
tree9616c8e85329f88318741a49157eb217bed7782b /zebra/zebra_vty.c
parent964788a11ffa185c89054144a53a2e1a6be69036 (diff)
zebra: add config control to hide backup nh events in nht
Add a config that can control hiding of backup-nexthop activation changes in nexthop-tracking. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 283a3e52d6..8187d99222 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -1696,7 +1696,6 @@ DEFUN (no_ipv6_nht_default_route,
"Filter Next Hop tracking route resolution\n"
"Resolve via default route\n")
{
-
ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
if (!zvrf)
@@ -1710,6 +1709,17 @@ DEFUN (no_ipv6_nht_default_route,
return CMD_SUCCESS;
}
+DEFPY_HIDDEN(rnh_hide_backups, rnh_hide_backups_cmd,
+ "[no] ip nht hide-backup-events",
+ NO_STR
+ IP_STR
+ "Nexthop-tracking configuration\n"
+ "Hide notification about backup nexthops\n")
+{
+ rnh_set_hide_backups(!no);
+ return CMD_SUCCESS;
+}
+
DEFPY (show_route,
show_route_cmd,
"show\
@@ -3656,6 +3666,9 @@ static int config_write_protocol(struct vty *vty)
if (!zebra_nhg_recursive_use_backups())
vty_out(vty, "no zebra nexthop resolve-via-backup\n");
+ if (rnh_get_hide_backups())
+ vty_out(vty, "ip nht hide-backup-events\n");
+
#ifdef HAVE_NETLINK
/* Include netlink info */
netlink_config_write_helper(vty);
@@ -4115,6 +4128,8 @@ void zebra_vty_init(void)
install_element(VRF_NODE, &no_ip_nht_default_route_cmd);
install_element(VRF_NODE, &ipv6_nht_default_route_cmd);
install_element(VRF_NODE, &no_ipv6_nht_default_route_cmd);
+ install_element(CONFIG_NODE, &rnh_hide_backups_cmd);
+
install_element(VIEW_NODE, &show_ipv6_mroute_cmd);
/* Commands for VRF */