summaryrefslogtreecommitdiffstats
path: root/bfdd
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2018-09-05 17:29:14 +0200
committerRafael Zalamena <rzalamena@opensourcerouting.org>2018-09-05 17:29:14 +0200
commit9835f17d33066fc4b4f91e2bcc3d9d12c5f2aa8a (patch)
tree402b386c5152561c043268bee10987ab1c1e1922 /bfdd
parentbfdd: use THREAD_OFF() instead of thread_cancel() (diff)
downloadfrr-9835f17d33066fc4b4f91e2bcc3d9d12c5f2aa8a.tar.xz
frr-9835f17d33066fc4b4f91e2bcc3d9d12c5f2aa8a.zip
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>
Diffstat (limited to 'bfdd')
-rw-r--r--bfdd/bfd_packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c
index cb932901a..4bdfb314e 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;
}