mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 20:01:10 +00:00
bfdd: disable echo on neighbor request
Don't send echo packets when the neighbor configures echo-interval of 0 (e.g. disabled). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
d236e76b37
commit
451eb5a2f8
@ -157,7 +157,8 @@ void ptm_bfd_echo_stop(struct bfd_session *bfd, int polling)
|
|||||||
void ptm_bfd_echo_start(struct bfd_session *bfd)
|
void ptm_bfd_echo_start(struct bfd_session *bfd)
|
||||||
{
|
{
|
||||||
bfd->echo_detect_TO = (bfd->remote_detect_mult * bfd->echo_xmt_TO);
|
bfd->echo_detect_TO = (bfd->remote_detect_mult * bfd->echo_xmt_TO);
|
||||||
ptm_bfd_echo_xmt_TO(bfd);
|
if (bfd->echo_detect_TO > 0)
|
||||||
|
ptm_bfd_echo_xmt_TO(bfd);
|
||||||
|
|
||||||
bfd->polling = 1;
|
bfd->polling = 1;
|
||||||
bfd->new_timers.desired_min_tx = bfd->up_min_tx;
|
bfd->new_timers.desired_min_tx = bfd->up_min_tx;
|
||||||
@ -324,7 +325,8 @@ int bfd_echo_xmt_cb(struct thread *t)
|
|||||||
{
|
{
|
||||||
struct bfd_session *bs = THREAD_ARG(t);
|
struct bfd_session *bs = THREAD_ARG(t);
|
||||||
|
|
||||||
ptm_bfd_echo_xmt_TO(bs);
|
if (bs->echo_xmt_TO > 0)
|
||||||
|
ptm_bfd_echo_xmt_TO(bs);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,8 @@ static int ptm_bfd_process_echo_pkt(int s)
|
|||||||
bfd->echo_detect_TO = bfd->remote_detect_mult * bfd->echo_xmt_TO;
|
bfd->echo_detect_TO = bfd->remote_detect_mult * bfd->echo_xmt_TO;
|
||||||
|
|
||||||
/* Update echo receive timeout. */
|
/* Update echo receive timeout. */
|
||||||
bfd_echo_recvtimer_update(bfd);
|
if (bfd->echo_detect_TO > 0)
|
||||||
|
bfd_echo_recvtimer_update(bfd);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user