diff --git a/msg.c b/msg.c index 4589374..b7e1053 100644 --- a/msg.c +++ b/msg.c @@ -391,9 +391,6 @@ int msg_post_recv(struct ptp_message *m, int cnt) break; } - if (msg_sots_missing(m)) - return -ETIME; - err = suffix_post_recv(m, suffix, cnt - pdulen); if (err) return err; diff --git a/port.c b/port.c index 3493f63..cf41725 100644 --- a/port.c +++ b/port.c @@ -2523,10 +2523,6 @@ enum fsm_event port_event(struct port *p, int fd_index) case -EBADMSG: pr_err("port %hu: bad message", portnum(p)); break; - case -ETIME: - pr_err("port %hu: received %s without timestamp", - portnum(p), msg_type_string(msg_type(msg))); - break; case -EPROTO: pr_debug("port %hu: ignoring message", portnum(p)); break; @@ -2534,6 +2530,12 @@ enum fsm_event port_event(struct port *p, int fd_index) msg_put(msg); return EV_NONE; } + if (msg_sots_missing(msg)) { + pr_err("port %hu: received %s without timestamp", + portnum(p), msg_type_string(msg_type(msg))); + msg_put(msg); + return EV_NONE; + } 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));