From: Renato Westphal Date: Wed, 26 Jul 2017 14:30:56 +0000 (-0300) Subject: eigrpd: minor fix in the redistribute command X-Git-Tag: frr-4.0-dev~481^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=493c8ac787162d0a5a3ead3dbfa20b003aeb5823;p=mirror%2Ffrr.git eigrpd: minor fix in the redistribute command Commands like "redistribute stati" and "redistribute osp" were being silently ignored. Signed-off-by: Renato Westphal --- diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c index 746db2abe9..465007478d 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 */