From: Daniel Walton <[email protected]>

Signed-off-by: Daniel Walton <[email protected]>
---
 ospf6d/ospf6_asbr.c | 26 ++++++++++++++++++++------
 ripd/rip_routemap.c | 12 ++++++++++--
 vtysh/extract.pl.in |  4 ++--
 3 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index b1620d4..a954812 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -1088,17 +1088,30 @@ DEFUN (set_metric,
 /* delete "set metric" */
 DEFUN (no_set_metric,
        no_set_metric_cmd,
-       "no set metric <0-4294967295>",
+       "no set metric",
        NO_STR
-       "Set value\n"
-       "Metric\n"
-       "METRIC value\n")
+       SET_STR
+       "Metric value for destination routing protocol\n")
 {
-  int ret = route_map_delete_set ((struct route_map_index *) vty->index,
-                                  "metric", argv[0]);
+  int ret = 0;
+
+  if (argc == 0)
+    ret = route_map_delete_set ((struct route_map_index *) vty->index,
+                                "metric", NULL);
+  else
+    ret = route_map_delete_set ((struct route_map_index *) vty->index,
+                                "metric", argv[0]);
   return route_map_command_status (vty, ret);
 }
 
+ALIAS (no_set_metric,
+       no_set_metric_val_cmd,
+       "no set metric <0-4294967295>",
+       NO_STR
+       SET_STR
+       "Metric value for destination routing protocol\n"
+       "Metric value\n")
+
 /* add "set forwarding-address" */
 DEFUN (ospf6_routemap_set_forwarding,
        ospf6_routemap_set_forwarding_cmd,
@@ -1157,6 +1170,7 @@ ospf6_routemap_init (void)
   /* ASE Metric */
   install_element (RMAP_NODE, &set_metric_cmd);
   install_element (RMAP_NODE, &no_set_metric_cmd);
+  install_element (RMAP_NODE, &no_set_metric_val_cmd);
 
   /* ASE Metric */
   install_element (RMAP_NODE, &ospf6_routemap_set_forwarding_cmd);
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c
index 37a986c..9bafdcd 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -1000,11 +1000,18 @@ DEFUN (no_set_metric,
 
 ALIAS (no_set_metric,
        no_set_metric_val_cmd,
-       "no set metric (<0-4294967295>|<+/-metric>)",
+       "no set metric <0-4294967295>",
+       NO_STR
+       SET_STR
+       "Metric value for destination routing protocol\n"
+       "Metric value\n")
+
+ALIAS (no_set_metric,
+       no_set_metric_addsub_cmd,
+       "no set metric <+/-metric>",
        NO_STR
        SET_STR
        "Metric value for destination routing protocol\n"
-       "Metric value\n"
        "Add or subtract metric\n")
 
 DEFUN (set_ip_nexthop,
@@ -1135,6 +1142,7 @@ rip_route_map_init ()
   install_element (RMAP_NODE, &set_metric_addsub_cmd);
   install_element (RMAP_NODE, &no_set_metric_cmd);
   install_element (RMAP_NODE, &no_set_metric_val_cmd);
+  install_element (RMAP_NODE, &no_set_metric_addsub_cmd);
   install_element (RMAP_NODE, &set_ip_nexthop_cmd);
   install_element (RMAP_NODE, &no_set_ip_nexthop_cmd);
   install_element (RMAP_NODE, &no_set_ip_nexthop_val_cmd);
diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in
index 78926c8..f9a6dc6 100755
--- a/vtysh/extract.pl.in
+++ b/vtysh/extract.pl.in
@@ -177,7 +177,7 @@ foreach (@ARGV) {
     }
 }
 
-my $bad_cli_stomps = 89;
+my $bad_cli_stomps = 90;
 # Currently we have $bad_cli_stomps.  This was determined by
 # running this script and counting up the collisions from what
 # was returned.
@@ -217,7 +217,7 @@ foreach (keys %live) {
 # Output install_element
 print <<EOF;
 void
-vtysh_init_cmd ()
+vtysh_init_cmd (void)
 {
 EOF
 
-- 
1.9.1


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to