summaryrefslogtreecommitdiffstats
path: root/ripngd
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-12-16 06:39:44 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-12-16 06:39:44 +0100
commit6d681bd874dc7dee4300a5d3a5ced8bb1a679643 (patch)
treed52fbb64abf2cd3a0d3ab181663797572e809925 /ripngd
parentMerge branch 'dev/osr/vty_index' (diff)
downloadfrr-6d681bd874dc7dee4300a5d3a5ced8bb1a679643.tar.xz
frr-6d681bd874dc7dee4300a5d3a5ced8bb1a679643.zip
all: use ->text when parsing protocol argument
and match on full protocol name in proto_redistnum() Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_zebra.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 09472683d..7daa3a887 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -321,11 +321,12 @@ DEFUN (ripng_redistribute_type,
{
int type;
- type = proto_redistnum(AFI_IP6, argv[2]->arg);
+ char *proto = argv[argc - 1]->text;
+ type = proto_redistnum(AFI_IP6, proto);
if (type < 0)
{
- vty_out(vty, "Invalid type %s%s", argv[2]->arg, VTY_NEWLINE);
+ vty_out(vty, "Invalid type %s%s", proto, VTY_NEWLINE);
return CMD_WARNING;
}
@@ -345,11 +346,13 @@ DEFUN (no_ripng_redistribute_type,
"Pointer to route-map entries\n")
{
int type;
- type = proto_redistnum(AFI_IP6, argv[2]->text);
+
+ char *proto = argv[2]->text;
+ type = proto_redistnum(AFI_IP6, proto);
if (type < 0)
{
- vty_out(vty, "Invalid type %s%s", argv[2]->text, VTY_NEWLINE);
+ vty_out(vty, "Invalid type %s%s", proto, VTY_NEWLINE);
return CMD_WARNING;
}