diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-01-28 11:00:42 -0500 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-01-28 11:00:42 -0500 |
| commit | 7c99d51bebb62bd06b6ca3b01291cf35f55c4e88 (patch) | |
| tree | fc369721bed07c38d7ea201237c7085ec9b4d8d6 /zebra/zebra_vty.c | |
| parent | 3812117bfcc154ee2dc50dc4cc2512545c872013 (diff) | |
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 'zebra/zebra_vty.c')
| -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 c8b96011dc..7b377a81c1 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); |
