ospf6d, ripd, vtysh: Fix "no set metric" for ospf6 and RIP

Allow the user to actually turn off the set metric command
in ospf6d and rip.

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index c3c06ed..6db1ca9 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -1089,17 +1089,30 @@
 /* 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,
@@ -1158,6 +1171,7 @@
   /* 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);