- time = bfd->forwarding_if_rx_detect_time;
- bfd->last_forwarding = (bfd->state == STATE_UP
- || (bfd->forwarding_if_rx && time > time_msec()))
- && bfd->rmt_diag != DIAG_PATH_DOWN
- && bfd->rmt_diag != DIAG_CPATH_DOWN
- && bfd->rmt_diag != DIAG_RCPATH_DOWN;
+ forwarding_if_rx = bfd->forwarding_if_rx
+ && bfd->forwarding_if_rx_detect_time > now
+ && bfd->demand_rx_bfd_time > now;
+
+ bfd->last_forwarding = (bfd->state == STATE_UP || forwarding_if_rx)
+ && bfd->rmt_diag != DIAG_PATH_DOWN
+ && bfd->rmt_diag != DIAG_CPATH_DOWN
+ && bfd->rmt_diag != DIAG_RCPATH_DOWN;