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 <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2018-09-05 12:29:14 -03:00
parent 8529e18048
commit 9835f17d33

View File

@ -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;
}