From: Rafael Zalamena Date: Wed, 5 Sep 2018 15:29:14 +0000 (-0300) Subject: bfdd: fix crash when receiving invalid echo packet X-Git-Tag: frr-7.1-dev~394^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F2959%2Fhead;p=mirror%2Ffrr.git 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 --- 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; }