ptp4l runs clockcheck on an incoming PTP message before checking its domain number. If the time on another domain is different, then clockcheck will trigger spurious synchronization faults.
This patch reorders the logic so that clockcheck only runs on messages in the same time domain. Reported-By: Filip Perich <per...@google.com> Signed-off-by: Cliff Spradlin <csprad...@google.com> --- port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/port.c b/port.c index a777701..ddb064a 100644 --- a/port.c +++ b/port.c @@ -2484,6 +2484,10 @@ static enum fsm_event bc_event(struct port *p, int fd_index) msg_put(msg); return EV_NONE; } + if (port_ignore(p, msg)) { + msg_put(msg); + return EV_NONE; + } if (msg_sots_missing(msg) && !(p->timestamping == TS_P2P1STEP && msg_type(msg) == PDELAY_REQ)) { pr_err("port %hu: received %s without timestamp", @@ -2495,10 +2499,6 @@ static enum fsm_event bc_event(struct port *p, int fd_index) ts_add(&msg->hwts.ts, -p->rx_timestamp_offset); clock_check_ts(p->clock, tmv_to_nanoseconds(msg->hwts.ts)); } - if (port_ignore(p, msg)) { - msg_put(msg); - return EV_NONE; - } switch (msg_type(msg)) { case SYNC: -- 2.18.0.rc1.242.g61856ae69a-goog ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel