]> git.puffer.fish Git - matthieu/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>
Wed, 24 Mar 2021 15:55:56 +0000 (18:55 +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 772bd2c88e2a7c22f47dbff10eba89c57d9fdf50..c966efd8ea71ee93b2545aadee58b9128f5aa0a2 100644 (file)
@@ -478,8 +478,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)