]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: fix crash when receiving invalid echo packet 2959/head
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 5 Sep 2018 15:29:14 +0000 (12:29 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 5 Sep 2018 15:29:14 +0000 (12:29 -0300)
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>
bfdd/bfd_packet.c

index cb932901aab6f2bff0a587213799ea24fd98ba52..4bdfb314e2348a9e13e3c181a95304d5d6d4b1b3 100644 (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;
        }