This commit is contained in:
Mingwei Zheng 2025-04-29 16:22:43 +00:00 committed by GitHub
commit 061d6b1cfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1439,6 +1439,8 @@ void bs_echo_timer_handler(struct bfd_session *bs)
*/
void bs_final_handler(struct bfd_session *bs)
{
uint64_t old_xmt_TO = bs->xmt_TO;
/* Start using our new timers. */
bs->cur_timers.desired_min_tx = bs->timers.desired_min_tx;
bs->cur_timers.required_min_rx = bs->timers.required_min_rx;
@ -1466,6 +1468,12 @@ void bs_final_handler(struct bfd_session *bs)
bs->xmt_TO = bs->timers.desired_min_tx;
else
bs->xmt_TO = bs->remote_timers.required_min_rx;
/* Only apply increased transmission interval after Poll Sequence */
if (bs->ses_state == PTM_BFD_UP && bs->xmt_TO > old_xmt_TO) {
bs->xmt_TO = old_xmt_TO; /* Keep old timing until Poll Sequence done */
return;
}
/* Apply new transmission timer immediately. */
ptm_bfd_start_xmt_timer(bs, false);