summaryrefslogtreecommitdiffstats
path: root/isisd/isis_redist.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2016-09-22 20:21:30 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-09-22 20:21:30 +0200
commit66c1ec097ed75f7161d00f6fb9fe6e76b10e0a6e (patch)
tree15ceab9f5533350a46e54ab2c219a8fc66778b5f /isisd/isis_redist.c
parentbgpd: more bgp_vty.c parser conversion (diff)
downloadfrr-66c1ec097ed75f7161d00f6fb9fe6e76b10e0a6e.tar.xz
frr-66c1ec097ed75f7161d00f6fb9fe6e76b10e0a6e.zip
Revert "isisd: Make work under new regime"
This reverts commit 38c249987301aac93bebc0cb7b51784d5827c066.
Diffstat (limited to 'isisd/isis_redist.c')
-rw-r--r--isisd/isis_redist.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c
index dd640d0bb..5311b5c69 100644
--- a/isisd/isis_redist.c
+++ b/isisd/isis_redist.c
@@ -563,7 +563,7 @@ DEFUN (isis_redistribute,
if (argc < 5)
return CMD_WARNING;
- family = str2family(argv[0]->arg);
+ family = str2family(argv[0]);
if (family < 0)
return CMD_WARNING;
@@ -571,13 +571,13 @@ DEFUN (isis_redistribute,
if (!afi)
return CMD_WARNING;
- type = proto_redistnum(afi, argv[1]->arg);
+ type = proto_redistnum(afi, argv[1]);
if (type < 0 || type == ZEBRA_ROUTE_ISIS)
return CMD_WARNING;
- if (!strcmp("level-1", argv[2]->arg))
+ if (!strcmp("level-1", argv[2]))
level = 1;
- else if (!strcmp("level-2", argv[2]->arg))
+ else if (!strcmp("level-2", argv[2]))
level = 2;
else
return CMD_WARNING;
@@ -588,11 +588,11 @@ DEFUN (isis_redistribute,
return CMD_WARNING;
}
- if (argv[3]->arg)
+ if (argv[3])
{
char *endp;
- metric = strtoul(argv[3]->arg, &endp, 10);
- if (argv[3]->arg[0] == '\0' || *endp != '\0')
+ metric = strtoul(argv[3], &endp, 10);
+ if (argv[3][0] == '\0' || *endp != '\0')
return CMD_WARNING;
}
else
@@ -600,7 +600,7 @@ DEFUN (isis_redistribute,
metric = 0xffffffff;
}
- routemap = argv[4]->arg;
+ routemap = argv[4];
isis_redist_set(area, level, family, type, metric, routemap, 0);
return 0;
@@ -627,7 +627,7 @@ DEFUN (no_isis_redistribute,
if (argc < 3)
return CMD_WARNING;
- family = str2family(argv[0]->arg);
+ family = str2family(argv[0]);
if (family < 0)
return CMD_WARNING;
@@ -635,13 +635,13 @@ DEFUN (no_isis_redistribute,
if (!afi)
return CMD_WARNING;
- type = proto_redistnum(afi, argv[1]->arg);
+ type = proto_redistnum(afi, argv[1]);
if (type < 0 || type == ZEBRA_ROUTE_ISIS)
return CMD_WARNING;
- if (!strcmp("level-1", argv[2]->arg))
+ if (!strcmp("level-1", argv[2]))
level = 1;
- else if (!strcmp("level-2", argv[2]->arg))
+ else if (!strcmp("level-2", argv[2]))
level = 2;
else
return CMD_WARNING;
@@ -676,13 +676,13 @@ DEFUN (isis_default_originate,
if (argc < 5)
return CMD_WARNING;
- family = str2family(argv[0]->arg);
+ family = str2family(argv[0]);
if (family < 0)
return CMD_WARNING;
- if (!strcmp("level-1", argv[1]->arg))
+ if (!strcmp("level-1", argv[1]))
level = 1;
- else if (!strcmp("level-2", argv[1]->arg))
+ else if (!strcmp("level-2", argv[1]))
level = 2;
else
return CMD_WARNING;
@@ -693,7 +693,7 @@ DEFUN (isis_default_originate,
return CMD_WARNING;
}
- if (argv[2]->arg && *argv[2]->arg != '\0')
+ if (argv[2] && *argv[2] != '\0')
originate_type = DEFAULT_ORIGINATE_ALWAYS;
else
originate_type = DEFAULT_ORIGINATE;
@@ -704,11 +704,11 @@ DEFUN (isis_default_originate,
vty_out(vty, "so use with care or use default-originate always.%s", VTY_NEWLINE);
}
- if (argv[3]->arg)
+ if (argv[3])
{
char *endp;
- metric = strtoul(argv[3]->arg, &endp, 10);
- if (argv[3]->arg[0] == '\0' || *endp != '\0')
+ metric = strtoul(argv[3], &endp, 10);
+ if (argv[3][0] == '\0' || *endp != '\0')
return CMD_WARNING;
}
else
@@ -716,7 +716,7 @@ DEFUN (isis_default_originate,
metric = 0xffffffff;
}
- routemap = argv[4]->arg;
+ routemap = argv[4];
isis_redist_set(area, level, family, DEFAULT_ROUTE, metric, routemap, originate_type);
return 0;
@@ -741,13 +741,13 @@ DEFUN (no_isis_default_originate,
if (argc < 2)
return CMD_WARNING;
- family = str2family(argv[0]->arg);
+ family = str2family(argv[0]);
if (family < 0)
return CMD_WARNING;
- if (!strcmp("level-1", argv[1]->arg))
+ if (!strcmp("level-1", argv[1]))
level = 1;
- else if (!strcmp("level-2", argv[1]->arg))
+ else if (!strcmp("level-2", argv[1]))
level = 2;
else
return CMD_WARNING;