From 28ddb51567f916f813d422a7cf7b3b41c2cff9ab Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Mon, 2 Apr 2018 20:21:04 -0700 Subject: [PATCH] port: Don't take the interval from unicast sync messages. According to the standard, unicast Sync messages are to be sent with the interval field set to 127. This patch adds a test to avoid incorrectly adopting that value as a new interval. Signed-off-by: Richard Cochran --- port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/port.c b/port.c index cf9e2a3..957a3b4 100644 --- a/port.c +++ b/port.c @@ -2150,7 +2150,8 @@ void process_sync(struct port *p, struct ptp_message *m) return; } - if (m->header.logMessageInterval != p->log_sync_interval) { + if (!msg_unicast(m) && + m->header.logMessageInterval != p->log_sync_interval) { p->log_sync_interval = m->header.logMessageInterval; clock_sync_interval(p->clock, p->log_sync_interval); }