]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Do not log `echo PING` commands from watchfrr 12407/head
authorDonald Sharp <sharpd@nvidia.com>
Sat, 26 Nov 2022 14:23:50 +0000 (09:23 -0500)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Mon, 28 Nov 2022 08:08:46 +0000 (08:08 +0000)
Since the `echo PING` commands are from watchfrr and are sent
a whole bunch when an operator has `log commands` on the amount
of logging done is quite significant.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit a8a0f80b634208c878e15335948810e1d532d1e7)

lib/vty.c

index 92db07677ae06f5b8b71b993a4e4ea142e98373c..5fe8a7955bbe398fd7339f7537a5a853bc8c5105 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -444,7 +444,8 @@ static int vty_command(struct vty *vty, char *buf)
        /*
         * Log non empty command lines
         */
-       if (do_log_commands)
+       if (do_log_commands &&
+           strncmp(buf, "echo PING", strlen("echo PING")) != 0)
                cp = buf;
        if (cp != NULL) {
                /* Skip white spaces. */