diff options
author | Russ White <russ@riw.us> | 2022-03-16 00:58:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 00:58:16 +0100 |
commit | 5d97021ba36666884c7caed69e3565e01f73eaf5 (patch) | |
tree | d27dc8e34ceee6c63b333c91f8c57a7a95ecbe67 /zebra/zebra_vty.c | |
parent | Merge pull request #10643 from Jafaral/ospf-multi-vrf (diff) | |
parent | zebra: cleanup protodown netlink logs (diff) | |
download | frr-5d97021ba36666884c7caed69e3565e01f73eaf5.tar.xz frr-5d97021ba36666884c7caed69e3565e01f73eaf5.zip |
Merge pull request #10427 from sworleys/Protodown-Reason-Upstream
Add Support for Setting Protodown Reason Code
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r-- | zebra/zebra_vty.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index cc1ba3d8f..32bbfd665 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -60,6 +60,7 @@ #include "northbound_cli.h" #include "zebra/zebra_nb.h" #include "zebra/kernel_netlink.h" +#include "zebra/if_netlink.h" #include "zebra/table_manager.h" #include "zebra/zebra_script.h" #include "zebra/rtadv.h" @@ -4357,6 +4358,31 @@ DEFUN_HIDDEN(no_zebra_kernel_netlink_batch_tx_buf, return CMD_SUCCESS; } +DEFPY (zebra_protodown_bit, + zebra_protodown_bit_cmd, + "zebra protodown reason-bit (0-31)$bit", + ZEBRA_STR + "Protodown Configuration\n" + "Reason Bit used in the kernel for application\n" + "Reason Bit range\n") +{ + if_netlink_set_frr_protodown_r_bit(bit); + return CMD_SUCCESS; +} + +DEFPY (no_zebra_protodown_bit, + no_zebra_protodown_bit_cmd, + "no zebra protodown reason-bit [(0-31)$bit]", + NO_STR + ZEBRA_STR + "Protodown Configuration\n" + "Reason Bit used in the kernel for setting protodown\n" + "Reason Bit Range\n") +{ + if_netlink_unset_frr_protodown_r_bit(); + return CMD_SUCCESS; +} + #endif /* HAVE_NETLINK */ DEFUN(ip_table_range, ip_table_range_cmd, @@ -4562,6 +4588,8 @@ void zebra_vty_init(void) #ifdef HAVE_NETLINK install_element(CONFIG_NODE, &zebra_kernel_netlink_batch_tx_buf_cmd); install_element(CONFIG_NODE, &no_zebra_kernel_netlink_batch_tx_buf_cmd); + install_element(CONFIG_NODE, &zebra_protodown_bit_cmd); + install_element(CONFIG_NODE, &no_zebra_protodown_bit_cmd); #endif /* HAVE_NETLINK */ #ifdef HAVE_SCRIPTING |