diff options
author | Mark Stapp <mjs@voltanet.io> | 2020-01-28 17:00:42 +0100 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2020-01-28 17:00:42 +0100 |
commit | 7c99d51bebb62bd06b6ca3b01291cf35f55c4e88 (patch) | |
tree | fc369721bed07c38d7ea201237c7085ec9b4d8d6 /zebra/zebra_vty.c | |
parent | Merge pull request #5727 from chiragshah6/mdev (diff) | |
download | frr-7c99d51bebb62bd06b6ca3b01291cf35f55c4e88.tar.xz frr-7c99d51bebb62bd06b6ca3b01291cf35f55c4e88.zip |
zebra: add config to disable use of kernel nexthops
Add a config that disables use of kernel-level nexthop ids.
Currently, zebra always uses nexthop ids if the kernel supports
them.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to '')
-rw-r--r-- | zebra/zebra_vty.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index c8b96011d..7b377a81c 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1404,6 +1404,19 @@ DEFPY (show_nexthop_group, return CMD_SUCCESS; } +DEFPY_HIDDEN(nexthop_group_use_enable, + nexthop_group_use_enable_cmd, + "[no] zebra nexthop kernel enable", + NO_STR + ZEBRA_STR + "Nexthop configuration \n" + "Configure use of kernel nexthops\n" + "Enable kernel nexthops\n") +{ + zebra_nhg_enable_kernel_nexthops(!no); + return CMD_SUCCESS; +} + DEFUN (no_ip_nht_default_route, no_ip_nht_default_route_cmd, "no ip nht resolve-via-default", @@ -3115,6 +3128,10 @@ static int config_write_protocol(struct vty *vty) /* Include dataplane info */ dplane_config_write_helper(vty); + /* Include nexthop-group config */ + if (!zebra_nhg_kernel_nexthops_enabled()) + vty_out(vty, "no zebra nexthop kernel enable\n"); + return 1; } @@ -3486,6 +3503,7 @@ void zebra_vty_init(void) install_element(CONFIG_NODE, &no_zebra_workqueue_timer_cmd); install_element(CONFIG_NODE, &zebra_packet_process_cmd); install_element(CONFIG_NODE, &no_zebra_packet_process_cmd); + install_element(CONFIG_NODE, &nexthop_group_use_enable_cmd); install_element(VIEW_NODE, &show_nexthop_group_cmd); install_element(VIEW_NODE, &show_interface_nexthop_group_cmd); |