diff --git a/nsm.c b/nsm.c index 0fb73fb..cefea5d 100644 --- a/nsm.c +++ b/nsm.c @@ -337,16 +337,17 @@ static struct ptp_message *nsm_recv(struct nsm *nsm, int fd) case -EBADMSG: pr_err("bad message"); break; - case -ETIME: - pr_err("received %s without timestamp", - msg_type_string(msg_type(msg))); - break; case -EPROTO: pr_debug("ignoring message"); break; } goto failed; } + if (msg_sots_missing(msg)) { + pr_err("received %s without timestamp", + msg_type_string(msg_type(msg))); + goto failed; + } return msg; failed: diff --git a/pmc_common.c b/pmc_common.c index d1eafe7..fcb9c8e 100644 --- a/pmc_common.c +++ b/pmc_common.c @@ -326,16 +326,17 @@ struct ptp_message *pmc_recv(struct pmc *pmc) case -EBADMSG: pr_err("bad message"); break; - case -ETIME: - pr_err("received %s without timestamp", - msg_type_string(msg_type(msg))); - break; case -EPROTO: pr_debug("ignoring message"); break; } goto failed; } + if (msg_sots_missing(msg)) { + pr_err("received %s without timestamp", + msg_type_string(msg_type(msg))); + goto failed; + } return msg; failed: