From 493c8ac787162d0a5a3ead3dbfa20b003aeb5823 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Wed, 26 Jul 2017 11:30:56 -0300 Subject: eigrpd: minor fix in the redistribute command Commands like "redistribute stati" and "redistribute osp" were being silently ignored. Signed-off-by: Renato Westphal --- eigrpd/eigrp_vty.c | 12 ++++++++---- 1 file 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 */ -- cgit v1.2.3