mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 03:27:39 +00:00
bfdd: deduplicate echo handling code
Use the standardized echo timer handling function. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
0592db9630
commit
73c62f8eb3
@ -418,10 +418,9 @@ static void _bfd_session_update(struct bfd_session *bs,
|
|||||||
goto skip_echo;
|
goto skip_echo;
|
||||||
|
|
||||||
BFD_SET_FLAG(bs->flags, BFD_SESS_FLAG_ECHO);
|
BFD_SET_FLAG(bs->flags, BFD_SESS_FLAG_ECHO);
|
||||||
ptm_bfd_echo_start(bs);
|
|
||||||
|
|
||||||
/* Activate/update echo receive timeout timer. */
|
/* Activate/update echo receive timeout timer. */
|
||||||
bfd_echo_recvtimer_update(bs);
|
bs_echo_timer_handler(bs);
|
||||||
} else {
|
} else {
|
||||||
/* Check if echo mode is already disabled. */
|
/* Check if echo mode is already disabled. */
|
||||||
if (!BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_ECHO))
|
if (!BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_ECHO))
|
||||||
|
@ -291,8 +291,7 @@ DEFPY(bfd_peer_echo, bfd_peer_echo_cmd, "[no] echo-mode",
|
|||||||
BFD_SET_FLAG(bs->flags, BFD_SESS_FLAG_ECHO);
|
BFD_SET_FLAG(bs->flags, BFD_SESS_FLAG_ECHO);
|
||||||
/* Apply setting immediately. */
|
/* Apply setting immediately. */
|
||||||
if (!BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_SHUTDOWN)) {
|
if (!BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_SHUTDOWN)) {
|
||||||
ptm_bfd_echo_start(bs);
|
bs_echo_timer_handler(bs);
|
||||||
bfd_echo_recvtimer_update(bs);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user