]> git.puffer.fish Git - mirror/frr.git/commitdiff
eigrpd: minor fix in the redistribute command
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 26 Jul 2017 14:30:56 +0000 (11:30 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 26 Jul 2017 14:51:00 +0000 (11:51 -0300)
Commands like "redistribute stati" and "redistribute osp" were being
silently ignored.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
eigrpd/eigrp_vty.c

index 746db2abe992599edb8d8e3ea28f93b6e9d6e565..465007478d940cfe328c187bf200a3196fc93f0e 100644 (file)
@@ -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 */