]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Modify zlog_warn to vty_out
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 20 Aug 2018 14:47:00 +0000 (10:47 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 6 Sep 2018 20:50:58 +0000 (20:50 +0000)
The vty_prefix_list_install function was modifying the prefix to match the
specified prefix length and warning in the log file.  Modify
code to use zlog_info as that a warn implies that something has
gone terribly wrong.  Additionally display to the terminal as
well so that user can get immediate feedback from something
that they can correct.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/plist.c

index 57460801279ac5b3c42f17562cabdafb13d79f7b..b374ca17800c390583ede9c4409f593ad9ffb99c 100644 (file)
@@ -930,9 +930,11 @@ static int vty_prefix_list_install(struct vty *vty, afi_t afi, const char *name,
                char buf_tmp[PREFIX2STR_BUFFER];
                prefix2str(&p, buf, sizeof(buf));
                prefix2str(&p_tmp, buf_tmp, sizeof(buf_tmp));
-               zlog_warn(
-                       "Prefix-list %s prefix changed from %s to %s to match length",
+               vty_out(vty,
+                       "%% Prefix-list %s prefix changed from %s to %s to match length\n",
                        name, buf, buf_tmp);
+               zlog_info("Prefix-list %s prefix changed from %s to %s to match length",
+                         name, buf, buf_tmp);
                p = p_tmp;
        }