summaryrefslogtreecommitdiff
path: root/ripngd/ripng_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd/ripng_interface.c')
-rw-r--r--ripngd/ripng_interface.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index c4dec7e7b1..7bee7625d1 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -953,20 +953,21 @@ DEFUN (ripng_network,
"RIPng enable on specified interface or network.\n"
"Interface or address")
{
+ int idx_if_or_addr = 1;
int ret;
struct prefix p;
- ret = str2prefix (argv[0], &p);
+ ret = str2prefix (argv[idx_if_or_addr]->arg, &p);
/* Given string is IPv6 network or interface name. */
if (ret)
ret = ripng_enable_network_add (&p);
else
- ret = ripng_enable_if_add (argv[0]);
+ ret = ripng_enable_if_add (argv[idx_if_or_addr]->arg);
if (ret < 0)
{
- vty_out (vty, "There is same network configuration %s%s", argv[0],
+ vty_out (vty, "There is same network configuration %s%s", argv[idx_if_or_addr]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
@@ -982,20 +983,21 @@ DEFUN (no_ripng_network,
"RIPng enable on specified interface or network.\n"
"Interface or address")
{
+ int idx_if_or_addr = 2;
int ret;
struct prefix p;
- ret = str2prefix (argv[0], &p);
+ ret = str2prefix (argv[idx_if_or_addr]->arg, &p);
/* Given string is interface name. */
if (ret)
ret = ripng_enable_network_delete (&p);
else
- ret = ripng_enable_if_delete (argv[0]);
+ ret = ripng_enable_if_delete (argv[idx_if_or_addr]->arg);
if (ret < 0)
{
- vty_out (vty, "can't find network %s%s", argv[0],
+ vty_out (vty, "can't find network %s%s", argv[idx_if_or_addr]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
@@ -1040,11 +1042,12 @@ DEFUN (ipv6_ripng_split_horizon_poisoned_reverse,
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;
@@ -1056,22 +1059,14 @@ DEFUN (no_ipv6_ripng_split_horizon,
return CMD_SUCCESS;
}
-ALIAS (no_ipv6_ripng_split_horizon,
- no_ipv6_ripng_split_horizon_poisoned_reverse_cmd,
- "no ipv6 ripng split-horizon poisoned-reverse",
- NO_STR
- IPV6_STR
- "Routing Information Protocol\n"
- "Perform split horizon\n"
- "With poisoned-reverse\n")
-
DEFUN (ripng_passive_interface,
ripng_passive_interface_cmd,
"passive-interface IFNAME",
"Suppress routing updates on an interface\n"
"Interface name\n")
{
- return ripng_passive_interface_set (vty, argv[0]);
+ int idx_ifname = 1;
+ return ripng_passive_interface_set (vty, argv[idx_ifname]->arg);
}
DEFUN (no_ripng_passive_interface,
@@ -1081,7 +1076,8 @@ DEFUN (no_ripng_passive_interface,
"Suppress routing updates on an interface\n"
"Interface name\n")
{
- return ripng_passive_interface_unset (vty, argv[0]);
+ int idx_ifname = 2;
+ return ripng_passive_interface_unset (vty, argv[idx_ifname]->arg);
}
static struct ripng_interface *
@@ -1210,5 +1206,4 @@ ripng_if_init ()
install_element (INTERFACE_NODE, &ipv6_ripng_split_horizon_cmd);
install_element (INTERFACE_NODE, &ipv6_ripng_split_horizon_poisoned_reverse_cmd);
install_element (INTERFACE_NODE, &no_ipv6_ripng_split_horizon_cmd);
- install_element (INTERFACE_NODE, &no_ipv6_ripng_split_horizon_poisoned_reverse_cmd);
}