diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-11-18 00:20:43 +0100 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-12-06 17:48:25 +0100 |
commit | a0f9b0c7c860f4b1c8f09723b51cd79298066fb7 (patch) | |
tree | 176bd2b112c1c48538c22ad5ed3adb6438407a6b /bfdd/bfd.c | |
parent | Merge pull request #10144 from ton31337/fix/bmp_memory_leaks (diff) | |
download | frr-a0f9b0c7c860f4b1c8f09723b51cd79298066fb7.tar.xz frr-a0f9b0c7c860f4b1c8f09723b51cd79298066fb7.zip |
bfdd: remove unnecessary receive timer restart
When the detection time expires, we put the session down and restart the
timer. As the comment in the code says, it's needed to zero the remote
discriminator after the second expiration.
But the RFC clearly says that this must be done on the first expiration:
bfd.RemoteDiscr
The remote discriminator for this BFD session. This is the
discriminator chosen by the remote system, and is totally opaque
to the local system. This MUST be initialized to zero. If a
period of a Detection Time passes without the receipt of a valid,
authenticated BFD packet from the remote system, this variable
MUST be set to zero.
And we actually already do it in `ptm_bfd_sess_dn`, so there's no need
to reset the timer and wait for it twice.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'bfdd/bfd.c')
-rw-r--r-- | bfdd/bfd.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index f49748045..184b82320 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -639,14 +639,6 @@ int bfd_recvtimer_cb(struct thread *t) case PTM_BFD_INIT: case PTM_BFD_UP: ptm_bfd_sess_dn(bs, BD_CONTROL_EXPIRED); - bfd_recvtimer_update(bs); - break; - - default: - /* Second detect time expiration, zero remote discr (section - * 6.5.1) - */ - bs->discrs.remote_discr = 0; break; } |