From: Donald Sharp Date: Sat, 26 Nov 2022 14:23:50 +0000 (-0500) Subject: lib: Do not log `echo PING` commands from watchfrr X-Git-Tag: docker/8.4.2~18^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F12407%2Fhead;p=mirror%2Ffrr.git lib: Do not log `echo PING` commands from watchfrr 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 (cherry picked from commit a8a0f80b634208c878e15335948810e1d532d1e7) --- diff --git a/lib/vty.c b/lib/vty.c index 92db07677a..5fe8a7955b 100644 --- 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. */