summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-07-26 16:30:56 +0200
committerRenato Westphal <renato@opensourcerouting.org>2017-07-26 16:51:00 +0200
commit493c8ac787162d0a5a3ead3dbfa20b003aeb5823 (patch)
tree1de9068a57369d21f93acb82871086a061d99ca6
parentbgpd/eigrpd: fix crashes found by the CLI fuzzer (diff)
downloadfrr-493c8ac787162d0a5a3ead3dbfa20b003aeb5823.tar.xz
frr-493c8ac787162d0a5a3ead3dbfa20b003aeb5823.zip
eigrpd: minor fix in the redistribute command
Commands like "redistribute stati" and "redistribute osp" were being silently ignored. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
-rw-r--r--eigrpd/eigrp_vty.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c
index 746db2abe..465007478 100644
--- a/eigrpd/eigrp_vty.c
+++ b/eigrpd/eigrp_vty.c
@@ -1005,9 +1005,11 @@ DEFUN (eigrp_redistribute_source_metric,
/* Get distribute source. */
argv_find(argv, argc, "redistribute", &idx);
- source = proto_redistnum(AFI_IP, argv[idx + 1]->arg);
- if (source < 0)
+ source = proto_redistnum(AFI_IP, argv[idx + 1]->text);
+ if (source < 0) {
+ vty_out(vty, "%% Invalid route type\n");
return CMD_WARNING_CONFIG_FAILED;
+ }
/* Get metrics values */
@@ -1034,9 +1036,11 @@ DEFUN (no_eigrp_redistribute_source_metric,
/* Get distribute source. */
argv_find(argv, argc, "redistribute", &idx);
- source = proto_redistnum(AFI_IP, argv[idx + 1]->arg);
- if (source < 0)
+ source = proto_redistnum(AFI_IP, argv[idx + 1]->text);
+ if (source < 0) {
+ vty_out(vty, "%% Invalid route type\n");
return CMD_WARNING_CONFIG_FAILED;
+ }
/* Get metrics values */