diff options
author | Klement Sekera <ksekera@cisco.com> | 2020-01-17 10:01:52 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-01-27 19:21:50 +0000 |
commit | 4d39f9c61c48d033ed5c9f729bdc975b58da29e8 (patch) | |
tree | caff60ba612ab49838b08c0317e56455ce8b91ca /src/vnet/bfd/bfd_main.c | |
parent | 6f090fa1fa44bb2de0565bbedb2756e37ea35040 (diff) |
bfd: reset peer discriminator on timeout
More RFC compliance.
Ticket: VPP-1816 BFD: peer discriminator not reset on timeout
Type: fix
Change-Id: I68063c18097d282b3527e3fb485c1d0d1fd1b0c8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet/bfd/bfd_main.c')
-rw-r--r-- | src/vnet/bfd/bfd_main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/bfd/bfd_main.c b/src/vnet/bfd/bfd_main.c index 0cc7d72c600..ef6ada8823f 100644 --- a/src/vnet/bfd/bfd_main.c +++ b/src/vnet/bfd/bfd_main.c @@ -1054,6 +1054,19 @@ bfd_check_rx_timeout (bfd_main_t * bm, bfd_session_t * bs, u64 now, now + bm->wheel_inaccuracy) { BFD_DBG ("Rx timeout, session goes down"); + /* + * RFC 5880 6.8.1. State Variables + + * 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. + */ + bs->remote_discr = 0; bfd_set_diag (bs, BFD_DIAG_CODE_det_time_exp); bfd_set_state (bm, bs, BFD_STATE_down, handling_wakeup); /* |