diff options
Diffstat (limited to 'src/vnet/fib/ip4_fib.c')
-rw-r--r-- | src/vnet/fib/ip4_fib.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c index a343c2b5f37..0eff8d0d485 100644 --- a/src/vnet/fib/ip4_fib.c +++ b/src/vnet/fib/ip4_fib.c @@ -216,6 +216,7 @@ ip4_fib_table_destroy (u32 fib_index) hash_unset (ip4_main.fib_index_by_table_id, fib_table->ft_table_id); } + vec_free (fib_table->ft_locks); vec_free(fib_table->ft_src_route_counts); ip4_fib_table_free(v4_fib); @@ -481,7 +482,7 @@ ip4_show_fib (vlib_main_t * vm, * entries for each table. * * @note This command will run for a long time when the FIB tables are - * comprised of millions of entries. For those senarios, consider displaying + * comprised of millions of entries. For those scenarios, consider displaying * a single table or summary mode. * * @cliexpar @@ -620,10 +621,29 @@ ip4_show_fib (vlib_main_t * vm, * 32 4 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip4_show_fib_command, static) = { .path = "show ip fib", .short_help = "show ip fib [summary] [table <table-id>] [index <fib-id>] [<ip4-addr>[/<mask>]] [mtrie] [detail]", .function = ip4_show_fib, }; -/* *INDENT-ON* */ + +static clib_error_t * +ip_config (vlib_main_t * vm, unformat_input_t * input) +{ + char *default_name = 0; + + while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) + { + if (unformat (input, "default-table-name %s", &default_name)) + ; + else + return clib_error_return (0, "unknown input '%U'", + format_unformat_error, input); + } + + fib_table_default_names[FIB_PROTOCOL_IP4] = default_name; + + return 0; +} + +VLIB_EARLY_CONFIG_FUNCTION (ip_config, "ip"); |