]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: fix starting echo receive timer
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 9 Mar 2021 22:17:47 +0000 (01:17 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 16 Mar 2021 14:25:06 +0000 (17:25 +0300)
Currently this timer is only started when we receive the first echo
packet. If we never receive the packet, the timer is never started and
the user falsely assumes that echo function is working.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
bfdd/bfd.c

index 3cbb3691ec47f434b3d64bc653842fc3145c5421..9dfffbf369da71a32336ddbd383172a69259048e 100644 (file)
@@ -494,8 +494,10 @@ void ptm_bfd_echo_stop(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);
-       if (bfd->echo_detect_TO > 0)
+       if (bfd->echo_detect_TO > 0) {
+               bfd_echo_recvtimer_update(bfd);
                ptm_bfd_echo_xmt_TO(bfd);
+       }
 }
 
 void ptm_bfd_sess_up(struct bfd_session *bfd)