summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-01-30 19:49:24 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-01-31 02:25:08 +0000
commit0d70298614a97ae709194b740e0fea5925f76e99 (patch)
treedc2630ea23f9f29a775792129d38f520fd90f134 /lib/routemap.c
parentba434debeeedac16a68b3c36d9bc8adb2c3a7be1 (diff)
lib, bgpd: fix miscellaneous route-map commands
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 70f3069a36..7be24dfda4 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -2338,8 +2338,12 @@ DEFUN (no_match_tag,
{
VTY_DECLVAR_CONTEXT (route_map_index, index);
+ int idx = 0;
+ char *arg = argv_find (argv, argc, "(1-4294967295)", &idx) ?
+ argv[idx]->arg : NULL;
+
if (rmap_match_set_hook.no_match_tag)
- return rmap_match_set_hook.no_match_tag (vty, index, "tag", argv[3]->arg,
+ return rmap_match_set_hook.no_match_tag (vty, index, "tag", arg,
RMAP_EVENT_MATCH_DELETED);
return CMD_SUCCESS;
}
@@ -2677,10 +2681,8 @@ DEFUN (rmap_onmatch_goto,
"Goto Clause number\n"
"Number\n")
{
- int idx_number = 2;
- char *num = NULL;
- num = argv[idx_number]->arg;
-
+ int idx = 0;
+ char *num = argv_find (argv, argc, "(1-65535)", &idx) ? argv[idx]->arg : NULL;
struct route_map_index *index = VTY_GET_CONTEXT (route_map_index);
int d = 0;