diff options
author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2017-05-02 21:20:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-02 21:20:30 +0200 |
commit | 6a8badfb9b6c4b8d20bb97118a488caac86b5012 (patch) | |
tree | 98cd5c7aabc82cdba2bed526b8e7942178248ed1 | |
parent | Merge pull request #439 from Jafaral/pim_rpgrp-fix (diff) | |
parent | pimd: Fix cli uplift mistakes (diff) | |
download | frr-6a8badfb9b6c4b8d20bb97118a488caac86b5012.tar.xz frr-6a8badfb9b6c4b8d20bb97118a488caac86b5012.zip |
Merge pull request #440 from donaldsharp/afi_safi3
Afi safi3
-rw-r--r-- | ospfd/ospf_vty.c | 20 | ||||
-rw-r--r-- | pimd/pim_cmd.c | 20 |
2 files changed, 21 insertions, 19 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index b4c456e0a..776cf21ae 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -7160,7 +7160,7 @@ DEFUN (no_ospf_redistribute_source, DEFUN (ospf_redistribute_instance_source, ospf_redistribute_instance_source_cmd, - "redistribute <ospf|table> (1-65535) [<metric (0-16777214)|metric-type (1-2)|route-map WORD>]", + "redistribute <ospf|table> (1-65535) {<metric (0-16777214)|metric-type (1-2)|route-map WORD>}", REDIST_STR "Open Shortest Path First\n" "Non-main Kernel Routing Table\n" @@ -7176,7 +7176,7 @@ DEFUN (ospf_redistribute_instance_source, VTY_DECLVAR_CONTEXT(ospf, ospf); int idx_ospf_table = 1; int idx_number = 2; - int idx_redist_param = 3; + int idx = 3; int source; int type = -1; int metric = -1; @@ -7208,19 +7208,21 @@ DEFUN (ospf_redistribute_instance_source, } /* Get metric value. */ - if (strcmp (argv[idx_redist_param]->arg, "metric") == 0) - if (!str2metric (argv[idx_redist_param+1]->arg, &metric)) + if (argv_find (argv, argc, "metric", &idx)) + if (!str2metric (argv[idx+1]->arg, &metric)) return CMD_WARNING; + idx = 3; /* Get metric type. */ - if (strcmp (argv[idx_redist_param]->arg, "metric-type") == 0) - if (!str2metric_type (argv[idx_redist_param+1]->arg, &type)) + if (argv_find (argv, argc, "metric-type", &idx)) + if (!str2metric_type (argv[idx+1]->arg, &type)) return CMD_WARNING; red = ospf_redist_add(ospf, source, instance); - if (strcmp (argv[idx_redist_param]->arg, "route-map") == 0) - ospf_routemap_set (red, argv[idx_redist_param+1]->arg); + idx = 3; + if (argv_find (argv, argc, "route-map", &idx)) + ospf_routemap_set (red, argv[idx+1]->arg); else ospf_routemap_unset (red); @@ -7229,7 +7231,7 @@ DEFUN (ospf_redistribute_instance_source, DEFUN (no_ospf_redistribute_instance_source, no_ospf_redistribute_instance_source_cmd, - "no redistribute <ospf|table> (1-65535) [<metric (0-16777214)|metric-type (1-2)|route-map WORD>]", + "no redistribute <ospf|table> (1-65535) {<metric (0-16777214)|metric-type (1-2)|route-map WORD>}", NO_STR REDIST_STR "Open Shortest Path First\n" diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 55970987e..29cf248e6 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -3637,7 +3637,7 @@ DEFUN (no_ip_pim_spt_switchover_infinity_plist, DEFUN (ip_pim_joinprune_time, ip_pim_joinprune_time_cmd, - "ip pim join-prune-interval <60-600>", + "ip pim join-prune-interval (60-600)", IP_STR "pim multicast routing\n" "Join Prune Send Interval\n" @@ -3649,7 +3649,7 @@ DEFUN (ip_pim_joinprune_time, DEFUN (no_ip_pim_joinprune_time, no_ip_pim_joinprune_time_cmd, - "no ip pim join-prune-interval <60-600>", + "no ip pim join-prune-interval (60-600)", NO_STR IP_STR "pim multicast routing\n" @@ -3662,19 +3662,19 @@ DEFUN (no_ip_pim_joinprune_time, DEFUN (ip_pim_register_suppress, ip_pim_register_suppress_cmd, - "ip pim register-suppress-time <5-60000>", + "ip pim register-suppress-time (5-60000)", IP_STR "pim multicast routing\n" "Register Suppress Timer\n" "Seconds\n") { - qpim_keep_alive_time = atoi (argv[3]->arg); + qpim_register_suppress_time = atoi (argv[3]->arg); return CMD_SUCCESS; } DEFUN (no_ip_pim_register_suppress, no_ip_pim_register_suppress_cmd, - "no ip pim register-suppress-time <5-60000>", + "no ip pim register-suppress-time (5-60000)", NO_STR IP_STR "pim multicast routing\n" @@ -3687,19 +3687,19 @@ DEFUN (no_ip_pim_register_suppress, DEFUN (ip_pim_keep_alive, ip_pim_keep_alive_cmd, - "ip pim keep-alive-timer <31-60000>", + "ip pim keep-alive-timer (31-60000)", IP_STR "pim multicast routing\n" "Keep alive Timer\n" "Seconds\n") { - qpim_rp_keep_alive_time = atoi (argv[4]->arg); + qpim_keep_alive_time = atoi (argv[3]->arg); return CMD_SUCCESS; } DEFUN (no_ip_pim_keep_alive, no_ip_pim_keep_alive_cmd, - "no ip pim keep-alive-timer <31-60000>", + "no ip pim keep-alive-timer (31-60000)", NO_STR IP_STR "pim multicast routing\n" @@ -3712,7 +3712,7 @@ DEFUN (no_ip_pim_keep_alive, DEFUN (ip_pim_packets, ip_pim_packets_cmd, - "ip pim packets <1-100>", + "ip pim packets (1-100)", IP_STR "pim multicast routing\n" "packets to process at one time per fd\n" @@ -3724,7 +3724,7 @@ DEFUN (ip_pim_packets, DEFUN (no_ip_pim_packets, no_ip_pim_packets_cmd, - "no ip pim packets <1-100>", + "no ip pim packets (1-100)", NO_STR IP_STR "pim multicast routing\n" |