summaryrefslogtreecommitdiffstats
path: root/isisd/isis_routemap.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2016-09-23 21:50:58 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-09-23 21:50:58 +0200
commitba4c5c830745e84b6943362e7077e4b1846b8bdf (patch)
tree6f61aa8fd0fa8d1792c15f0eb71733ff3f335626 /isisd/isis_routemap.c
parentbgpd: add 'int idx_foo' argv index variables (diff)
downloadfrr-ba4c5c830745e84b6943362e7077e4b1846b8bdf.tar.xz
frr-ba4c5c830745e84b6943362e7077e4b1846b8bdf.zip
isisd: add 'int idx_foo' argv index variables
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'isisd/isis_routemap.c')
-rw-r--r--isisd/isis_routemap.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/isisd/isis_routemap.c b/isisd/isis_routemap.c
index fd6bff848..b9f6c7a55 100644
--- a/isisd/isis_routemap.c
+++ b/isisd/isis_routemap.c
@@ -354,7 +354,8 @@ DEFUN (match_ip_address,
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
- return isis_route_match_add(vty, vty->index, "ip address", argv[3]->arg);
+ int idx_acl = 3;
+ return isis_route_match_add(vty, vty->index, "ip address", argv[idx_acl]->arg);
}
/*
@@ -377,9 +378,10 @@ DEFUN (no_match_ip_address,
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
+ int idx_acl = 4;
if (argc == 0)
return isis_route_match_delete(vty, vty->index, "ip address", NULL);
- return isis_route_match_delete(vty, vty->index, "ip address", argv[4]->arg);
+ return isis_route_match_delete(vty, vty->index, "ip address", argv[idx_acl]->arg);
}
@@ -394,7 +396,8 @@ DEFUN (match_ip_address_prefix_list,
"Match entries of prefix-lists\n"
"IP prefix-list name\n")
{
- return isis_route_match_add(vty, vty->index, "ip address prefix-list", argv[4]->arg);
+ int idx_word = 4;
+ return isis_route_match_add(vty, vty->index, "ip address prefix-list", argv[idx_word]->arg);
}
/*
@@ -433,7 +436,8 @@ DEFUN (match_ipv6_address,
"Match IPv6 address of route\n"
"IPv6 access-list name\n")
{
- return isis_route_match_add(vty, vty->index, "ipv6 address", argv[3]->arg);
+ int idx_word = 3;
+ return isis_route_match_add(vty, vty->index, "ipv6 address", argv[idx_word]->arg);
}
/*
@@ -454,9 +458,10 @@ DEFUN (no_match_ipv6_address,
"Match IPv6 address of route\n"
"IPv6 access-list name\n")
{
+ int idx_word = 4;
if (argc == 0)
return isis_route_match_delete(vty, vty->index, "ipv6 address", NULL);
- return isis_route_match_delete(vty, vty->index, "ipv6 address", argv[4]->arg);
+ return isis_route_match_delete(vty, vty->index, "ipv6 address", argv[idx_word]->arg);
}
@@ -471,7 +476,8 @@ DEFUN (match_ipv6_address_prefix_list,
"Match entries of prefix-lists\n"
"IP prefix-list name\n")
{
- return isis_route_match_add(vty, vty->index, "ipv6 address prefix-list", argv[4]->arg);
+ int idx_word = 4;
+ return isis_route_match_add(vty, vty->index, "ipv6 address prefix-list", argv[idx_word]->arg);
}
/*
@@ -512,7 +518,8 @@ DEFUN (set_metric,
"Metric vale for destination routing protocol\n"
"Metric value\n")
{
- return isis_route_set_add(vty, vty->index, "metric", argv[2]->arg);
+ int idx_number = 2;
+ return isis_route_set_add(vty, vty->index, "metric", argv[idx_number]->arg);
}
/*
@@ -534,9 +541,10 @@ DEFUN (no_set_metric,
"Metric value for destination routing protocol\n"
"Metric value\n")
{
+ int idx_number = 3;
if (argc == 0)
return isis_route_set_delete(vty, vty->index, "metric", NULL);
- return isis_route_set_delete(vty, vty->index, "metric", argv[3]->arg);
+ return isis_route_set_delete(vty, vty->index, "metric", argv[idx_number]->arg);
}
{