From 9835f17d33066fc4b4f91e2bcc3d9d12c5f2aa8a Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Wed, 5 Sep 2018 12:29:14 -0300 Subject: [PATCH] bfdd: fix crash when receiving invalid echo packet The log function would improperly format a string using an integer causing a crash. This situation was found when switching echo mode with a active connection. Signed-off-by: Rafael Zalamena --- bfdd/bfd_packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c index cb932901aa..4bdfb314e2 100644 --- a/bfdd/bfd_packet.c +++ b/bfdd/bfd_packet.c @@ -186,8 +186,8 @@ static int ptm_bfd_process_echo_pkt(int s) } if (!BFD_CHECK_FLAG(bfd->flags, BFD_SESS_FLAG_ECHO_ACTIVE)) { - log_debug("echo-packet: echo disabled [%s]", my_discr, - bs_to_string(bfd)); + log_debug("echo-packet: echo disabled [%s] (id:%u)", + bs_to_string(bfd), my_discr); return -1; } -- 2.39.5