bfd: fix desired_min_tx_nsec update 05/34105/4
authorAlexander Skorichenko <askorichenko@netgate.com>
Thu, 14 Oct 2021 10:09:02 +0000 (13:09 +0300)
committerMatthew Smith <mgsmith@netgate.com>
Tue, 19 Oct 2021 13:31:40 +0000 (13:31 +0000)
commit0dfad21e88a5af3d429af5b429f7a7b5a9af7c04
treeed96218cc3d7de8df61811f10dff82072a11d0ce
parenta4ba8da26f053db714d77943c01090e968724273
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
src/vnet/bfd/bfd_main.c