]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: Fix Ambiguous Commands
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 30 Jan 2017 00:08:03 +0000 (19:08 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 30 Jan 2017 00:19:27 +0000 (19:19 -0500)
Ospf6d has ambiguous commands due to duplicated
functions that belong in lib/routemap.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospf6d/ospf6_asbr.c

index 88cc07e1af57c84374a37b7e3c5b6593964bd7f9..643519e3fa6553d16b52e77c2f9e03199b327a6c 100644 (file)
@@ -1095,77 +1095,6 @@ route_map_command_status (struct vty *vty, int ret)
   return CMD_WARNING;
 }
 
-/* add "match address" */
-DEFUN (ospf6_routemap_match_address_prefixlist,
-       ospf6_routemap_match_address_prefixlist_cmd,
-       "match ipv6 address prefix-list WORD",
-       "Match values\n"
-       IPV6_STR
-       "Match address of route\n"
-       "Match entries of prefix-lists\n"
-       "IPv6 prefix-list name\n")
-{
-  VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
-  int idx_word = 4;
-  int ret = route_map_add_match (route_map_index, 
-                                 "ipv6 address prefix-list", argv[idx_word]->arg);
-  return route_map_command_status (vty, ret);
-}
-
-/* delete "match address" */
-DEFUN (ospf6_routemap_no_match_address_prefixlist,
-       ospf6_routemap_no_match_address_prefixlist_cmd,
-       "no match ipv6 address prefix-list WORD",
-       NO_STR
-       "Match values\n"
-       IPV6_STR
-       "Match address of route\n"
-       "Match entries of prefix-lists\n"
-       "IPv6 prefix-list name\n")
-{
-  VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
-  int idx_word = 5;
-  int ret = route_map_delete_match (route_map_index, 
-                                    "ipv6 address prefix-list", argv[idx_word]->arg);
-  return route_map_command_status (vty, ret);
-}
-
-/* "match interface" */
-DEFUN (ospf6_routemap_match_interface,
-       ospf6_routemap_match_interface_cmd,
-       "match interface WORD",
-       MATCH_STR
-       "Match first hop interface of route\n"
-       "Interface name\n")
-{
-  VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
-  int idx_word = 2;
-  return route_map_add_match (route_map_index, 
-                              "interface", argv[idx_word]->arg);
-}
-
-/* "no match interface WORD" */
-DEFUN (ospf6_routemap_no_match_interface,
-       ospf6_routemap_no_match_interface_cmd,
-       "no match interface [WORD]",
-       NO_STR
-       MATCH_STR
-       "Match first hop interface of route\n"
-       "Interface name\n")
-{
-  VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
-  int idx_word = 3;
-  int ret;
-
-  if (argc == 4)
-    ret  = route_map_delete_match (route_map_index, 
-                                    "interface", argv[idx_word]->arg);
-  else
-    ret  = route_map_delete_match (route_map_index, 
-                                    "interface", NULL);
-  return route_map_command_status (vty, ret);
-}
-
 /* add "set metric-type" */
 DEFUN (ospf6_routemap_set_metric_type,
        ospf6_routemap_set_metric_type_cmd,
@@ -1230,35 +1159,6 @@ DEFUN (ospf6_routemap_no_set_forwarding,
   return route_map_command_status (vty, ret);
 }
 
-/* add "set tag" */
-DEFUN (ospf6_routemap_set_tag,
-       ospf6_routemap_set_tag_cmd,
-       "set tag (1-4294967295)",
-       "Set value\n"
-       "Tag value for routing protocol\n"
-       "Tag value\n")
-{
-  VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
-  int ret = route_map_add_set (route_map_index, 
-                               "tag", argv[2]->arg);
-  return route_map_command_status (vty, ret);
-}
-
-/* delete "set tag" */
-DEFUN (ospf6_routemap_no_set_tag,
-       ospf6_routemap_no_set_tag_cmd,
-       "no set tag [(1-4294967295)]",
-       NO_STR
-       "Set value\n"
-       "Tag value for routing protocol\n"
-       "Tag value\n")
-{
-  char *tag = (argc == 4) ? argv[3]->arg : NULL;
-  VTY_DECLVAR_CONTEXT (route_map_index, index);
-  int ret = route_map_delete_set (index, "tag", tag);
-  return route_map_command_status (vty, ret);
-}
-
 static void
 ospf6_routemap_init (void)
 {
@@ -1279,14 +1179,6 @@ ospf6_routemap_init (void)
   route_map_install_set (&ospf6_routemap_rule_set_forwarding_cmd);
   route_map_install_set (&ospf6_routemap_rule_set_tag_cmd);
 
-  /* Match address prefix-list */
-  install_element (RMAP_NODE, &ospf6_routemap_match_address_prefixlist_cmd);
-  install_element (RMAP_NODE, &ospf6_routemap_no_match_address_prefixlist_cmd);
-
-  /* Match interface */
-  install_element (RMAP_NODE, &ospf6_routemap_match_interface_cmd);
-  install_element (RMAP_NODE, &ospf6_routemap_no_match_interface_cmd);
-
   /* ASE Metric Type (e.g. Type-1/Type-2) */
   install_element (RMAP_NODE, &ospf6_routemap_set_metric_type_cmd);
   install_element (RMAP_NODE, &ospf6_routemap_no_set_metric_type_cmd);
@@ -1294,10 +1186,6 @@ ospf6_routemap_init (void)
   /* ASE Metric */
   install_element (RMAP_NODE, &ospf6_routemap_set_forwarding_cmd);
   install_element (RMAP_NODE, &ospf6_routemap_no_set_forwarding_cmd);
-
-  /* Tag */
-  install_element (RMAP_NODE, &ospf6_routemap_set_tag_cmd);
-  install_element (RMAP_NODE, &ospf6_routemap_no_set_tag_cmd);
 }