]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: deduplicate echo handling code
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 31 Jan 2019 16:16:09 +0000 (14:16 -0200)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 14 Feb 2019 16:17:29 +0000 (14:17 -0200)
Use the standardized echo timer handling function.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
bfdd/bfd.c
bfdd/bfdd_vty.c

index 4662d16976c0eb38aa736104aaf9d2e6fff24c65..a95f4b77b85d5333e60e492d6c642b16003f4173 100644 (file)
@@ -418,10 +418,9 @@ static void _bfd_session_update(struct bfd_session *bs,
                        goto skip_echo;
 
                BFD_SET_FLAG(bs->flags, BFD_SESS_FLAG_ECHO);
-               ptm_bfd_echo_start(bs);
 
                /* Activate/update echo receive timeout timer. */
-               bfd_echo_recvtimer_update(bs);
+               bs_echo_timer_handler(bs);
        } else {
                /* Check if echo mode is already disabled. */
                if (!BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_ECHO))
index 032bccaf1bb214f7ed241227e66ddef84becae08..a608310fdc91416366838bda234c7c66af73d748 100644 (file)
@@ -291,8 +291,7 @@ DEFPY(bfd_peer_echo, bfd_peer_echo_cmd, "[no] echo-mode",
                BFD_SET_FLAG(bs->flags, BFD_SESS_FLAG_ECHO);
                /* Apply setting immediately. */
                if (!BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_SHUTDOWN)) {
-                       ptm_bfd_echo_start(bs);
-                       bfd_echo_recvtimer_update(bs);
+                       bs_echo_timer_handler(bs);
                }
        }