diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 6d28c2cdc5..3b18d152e8 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -8116,7 +8116,7 @@ DEFUN (no_ip_ospf_area, DEFUN (ospf_redistribute_source, ospf_redistribute_source_cmd, - "redistribute " FRR_REDIST_STR_OSPFD " []", + "redistribute " FRR_REDIST_STR_OSPFD " [{metric (0-16777214)|metric-type (1-2)|route-map WORD}]", REDIST_STR FRR_REDIST_HELP_STR_OSPFD "Metric for redistributed routes\n" @@ -8150,12 +8150,12 @@ DEFUN (ospf_redistribute_source, return CMD_WARNING_CONFIG_FAILED; } /* Get metric type. */ - else if (argv_find(argv, argc, "(1-2)", &idx)) { + if (argv_find(argv, argc, "(1-2)", &idx)) { if (!str2metric_type(argv[idx]->arg, &type)) return CMD_WARNING_CONFIG_FAILED; } /* Get route-map */ - else if (argv_find(argv, argc, "WORD", &idx)) { + if (argv_find(argv, argc, "WORD", &idx)) { ospf_routemap_set(red, argv[idx]->arg); } else ospf_routemap_unset(red); @@ -8165,7 +8165,7 @@ DEFUN (ospf_redistribute_source, DEFUN (no_ospf_redistribute_source, no_ospf_redistribute_source_cmd, - "no redistribute " FRR_REDIST_STR_OSPFD " []", + "no redistribute " FRR_REDIST_STR_OSPFD " [{metric (0-16777214)|metric-type (1-2)|route-map WORD}]", NO_STR REDIST_STR FRR_REDIST_HELP_STR_OSPFD @@ -8355,7 +8355,7 @@ DEFUN (no_ospf_distribute_list_out, /* Default information originate. */ DEFUN (ospf_default_information_originate, ospf_default_information_originate_cmd, - "default-information originate []", + "default-information originate [{always|metric (0-16777214)|metric-type (1-2)|route-map WORD}]", "Control distribution of default information\n" "Distribute a default route\n" "Always advertise default route\n" @@ -8379,17 +8379,17 @@ DEFUN (ospf_default_information_originate, if (argv_find(argv, argc, "always", &idx)) default_originate = DEFAULT_ORIGINATE_ALWAYS; /* Get metric value */ - else if (argv_find(argv, argc, "(0-16777214)", &idx)) { + if (argv_find(argv, argc, "(0-16777214)", &idx)) { if (!str2metric(argv[idx]->arg, &metric)) return CMD_WARNING_CONFIG_FAILED; } /* Get metric type. */ - else if (argv_find(argv, argc, "(1-2)", &idx)) { + if (argv_find(argv, argc, "(1-2)", &idx)) { if (!str2metric_type(argv[idx]->arg, &type)) return CMD_WARNING_CONFIG_FAILED; } /* Get route-map */ - else if (argv_find(argv, argc, "WORD", &idx)) + if (argv_find(argv, argc, "WORD", &idx)) ospf_routemap_set(red, argv[idx]->arg); else ospf_routemap_unset(red); @@ -8400,7 +8400,7 @@ DEFUN (ospf_default_information_originate, DEFUN (no_ospf_default_information_originate, no_ospf_default_information_originate_cmd, - "no default-information originate []", + "no default-information originate [{always|metric (0-16777214)|metric-type (1-2)|route-map WORD}]", NO_STR "Control distribution of default information\n" "Distribute a default route\n"