diff options
author | Alexander Skorichenko <askorichenko@netgate.com> | 2021-10-14 13:09:02 +0300 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2021-10-19 13:31:40 +0000 |
commit | 0dfad21e88a5af3d429af5b429f7a7b5a9af7c04 (patch) | |
tree | ed96218cc3d7de8df61811f10dff82072a11d0ce /src/vnet/bfd | |
parent | a4ba8da26f053db714d77943c01090e968724273 (diff) |
bfd: fix desired_min_tx_nsec update
Type: fix
Currently, the change in desired_min_tx value initiated locally
doesn't result in actual update of the transmission interval.
bfd_session_t structure has two fields for each of protocol's
local time parameters
desired_min_tx, required_min_rx
In a case of a parameter update,
"config_" prefixed fields store new values sent to remote
bs.config_desired_min_tx_nsec,
bs.config_required_min_rx_nsec
Those prefixed "effective_", keep old values, still in charge,
until new ones are being negotiated between peers:
bs.effective_desired_min_tx_nsec,
bs.effective_required_min_rx_nsec
Currently, upon termination of the Poll Sequence (negotiation) only
bfd_set_effective_required_min_rx()
is called to update effective RX value. TX value remains unchanged.
With this fix, add a call to
bfd_set_effective_desired_min_tx()
to set new, acknowledged TX value in effect.
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Change-Id: I80b6746533839c9572598f1ad9dabb33e621a525
Diffstat (limited to 'src/vnet/bfd')
-rw-r--r-- | src/vnet/bfd/bfd_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/bfd/bfd_main.c b/src/vnet/bfd/bfd_main.c index c67317f5789..b2bdd6cda70 100644 --- a/src/vnet/bfd/bfd_main.c +++ b/src/vnet/bfd/bfd_main.c @@ -1847,6 +1847,8 @@ bfd_consume_pkt (vlib_main_t * vm, bfd_main_t * bm, const bfd_pkt_t * pkt, bfd_set_poll_state (bs, BFD_POLL_NOT_NEEDED); if (BFD_STATE_up == bs->local_state) { + bfd_set_effective_desired_min_tx ( + bm, bs, now, bs->config_desired_min_tx_nsec); bfd_set_effective_required_min_rx (bm, bs, clib_max (bs->echo * bm->min_required_min_rx_while_echo_nsec, |