Skip to content

Commit

Permalink
port: Don't check timestamps from non-slave ports.
Browse files Browse the repository at this point in the history
Don't perform the sanity check on receive timestamps from ports in
non-slave states to avoid false positives in the jbod mode, where
the timestamps can be generated by different clocks.

Reviewed-by: Jacob Keller <[email protected]>
Signed-off-by: Miroslav Lichvar <[email protected]>
  • Loading branch information
mlichvar authored and richardcochran committed Aug 4, 2021
1 parent 262a49b commit e117e37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion port.c
Original file line number Diff line number Diff line change
Expand Up @@ -2749,7 +2749,10 @@ static enum fsm_event bc_event(struct port *p, int fd_index)
}
if (msg_sots_valid(msg)) {
ts_add(&msg->hwts.ts, -p->rx_timestamp_offset);
clock_check_ts(p->clock, tmv_to_nanoseconds(msg->hwts.ts));
if (p->state == PS_SLAVE) {
clock_check_ts(p->clock,
tmv_to_nanoseconds(msg->hwts.ts));
}
}

switch (msg_type(msg)) {
Expand Down

0 comments on commit e117e37

Please sign in to comment.