Skip to content

Commit

Permalink
ripngd: dispose of some CHECK ME's for ripng
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
  • Loading branch information
qlyoung committed Sep 27, 2016
1 parent 4f026db commit 481af2e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 87 deletions.
16 changes: 3 additions & 13 deletions ripngd/ripng_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,23 +1040,14 @@ DEFUN (ipv6_ripng_split_horizon_poisoned_reverse,
return CMD_SUCCESS;
}

/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no ipv6 ripng split-horizon poisoned-reverse",
* NO_STR
* IPV6_STR
* "Routing Information Protocol\n"
* "Perform split horizon\n"
* "With poisoned-reverse\n"
*
*/
DEFUN (no_ipv6_ripng_split_horizon,
no_ipv6_ripng_split_horizon_cmd,
"no ipv6 ripng split-horizon",
"no ipv6 ripng split-horizon [poisoned-reverse]",
NO_STR
IPV6_STR
"Routing Information Protocol\n"
"Perform split horizon\n")
"Perform split horizon\n"
"With poisoned-reverse\n")
{
struct interface *ifp;
struct ripng_interface *ri;
Expand All @@ -1068,7 +1059,6 @@ DEFUN (no_ipv6_ripng_split_horizon,
return CMD_SUCCESS;
}


DEFUN (ripng_passive_interface,
ripng_passive_interface_cmd,
"passive-interface IFNAME",
Expand Down
104 changes: 30 additions & 74 deletions ripngd/ripng_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,23 +511,16 @@ DEFUN (match_metric,
return ripng_route_match_add (vty, vty->index, "metric", argv[idx_number]->arg);
}

/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no match metric <0-4294967295>",
* NO_STR
* MATCH_STR
* "Match metric of route\n"
* "Metric value\n"
*
*/
DEFUN (no_match_metric,
no_match_metric_cmd,
"no match metric",
"no match metric [(0-4294967295)]",
NO_STR
MATCH_STR
"Match metric of route\n")
"Match metric of route\n"
"Metric value\n")
{
return ripng_route_match_delete (vty, vty->index, "metric", argv[3]->arg);
char *mval = (argc == 4) ? argv[3]->arg : NULL;
return ripng_route_match_delete (vty, vty->index, "metric", mval);
}


Expand All @@ -542,23 +535,16 @@ DEFUN (match_interface,
return ripng_route_match_add (vty, vty->index, "interface", argv[idx_word]->arg);
}

/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no match interface WORD",
* NO_STR
* MATCH_STR
* "Match first hop interface of route\n"
* "Interface name\n"
*
*/
DEFUN (no_match_interface,
no_match_interface_cmd,
"no match interface",
"no match interface [INTERFACE]",
NO_STR
MATCH_STR
"Match first hop interface of route\n")
"Match first hop interface of route\n"
"Interface name\n")
{
return ripng_route_match_delete (vty, vty->index, "interface", argv[3]->arg);
char *iface = (argc == 4) ? argv[3]->arg : NULL;
return ripng_route_match_delete (vty, vty->index, "interface", iface);
}


Expand All @@ -573,23 +559,16 @@ DEFUN (match_tag,
return ripng_route_match_add (vty, vty->index, "tag", argv[idx_number]->arg);
}

/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no match tag <1-65535>",
* NO_STR
* MATCH_STR
* "Match tag of route\n"
* "Metric value\n"
*
*/
DEFUN (no_match_tag,
no_match_tag_cmd,
"no match tag",
"no match tag [(1-65535)]",
NO_STR
MATCH_STR
"Match tag of route\n")
"Match tag of route\n"
"Metric value\n")
{
return ripng_route_match_delete (vty, vty->index, "tag", argv[3]->arg);
char *mval = (argc == 4) ? argv[3]->arg : NULL;
return ripng_route_match_delete (vty, vty->index, "tag", mval);
}


Expand All @@ -606,23 +585,16 @@ DEFUN (set_metric,
return ripng_route_set_add (vty, vty->index, "metric", argv[idx_number]->arg);
}

/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no set metric <0-4294967295>",
* NO_STR
* SET_STR
* "Metric value for destination routing protocol\n"
* "Metric value\n"
*
*/
DEFUN (no_set_metric,
no_set_metric_cmd,
"no set metric",
"no set metric [(0-4294967295)]",
NO_STR
SET_STR
"Metric value for destination routing protocol\n")
"Metric value for destination routing protocol\n"
"Metric value\n")
{
return ripng_route_set_delete (vty, vty->index, "metric", argv[3]->arg);
char *mval = (argc == 4) ? argv[3]->arg : NULL;
return ripng_route_set_delete (vty, vty->index, "metric", mval);
}


Expand Down Expand Up @@ -655,27 +627,18 @@ DEFUN (set_ipv6_nexthop_local,
return ripng_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[idx_ipv6]->arg);
}

/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no set ipv6 next-hop local X:X::X:X",
* NO_STR
* SET_STR
* IPV6_STR
* "IPv6 next-hop address\n"
* "IPv6 local address\n"
* "IPv6 address of next hop\n"
*
*/
DEFUN (no_set_ipv6_nexthop_local,
no_set_ipv6_nexthop_local_cmd,
"no set ipv6 next-hop local",
"no set ipv6 next-hop local [X:X::X:X]",
NO_STR
SET_STR
IPV6_STR
"IPv6 next-hop address\n"
"IPv6 local address\n")
"IPv6 local address\n"
"IPv6 address of next hop\n")
{
return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", argv[5]->arg);
char *addr = (argc == 6) ? argv[5]->arg : NULL;
return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", addr);
}


Expand All @@ -690,23 +653,16 @@ DEFUN (set_tag,
return ripng_route_set_add (vty, vty->index, "tag", argv[idx_number]->arg);
}

/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no set tag <1-65535>",
* NO_STR
* SET_STR
* "Tag value for routing protocol\n"
* "Tag value\n"
*
*/
DEFUN (no_set_tag,
no_set_tag_cmd,
"no set tag",
"no set tag [(1-65535)]",
NO_STR
SET_STR
"Tag value for routing protocol\n")
"Tag value for routing protocol\n"
"Tag value\n")
{
return ripng_route_set_delete (vty, vty->index, "tag", argv[3]->arg);
char *tag = (argc == 4) ? argv[3]->arg : NULL;
return ripng_route_set_delete (vty, vty->index, "tag", tag);
}


Expand Down

0 comments on commit 481af2e

Please sign in to comment.