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 <richardcochran@gmail.com>
master
Richard Cochran 2018-04-02 20:21:04 -07:00
parent 494643d1fb
commit 28ddb51567
1 changed files with 2 additions and 1 deletions

3
port.c
View File

@ -2150,7 +2150,8 @@ void process_sync(struct port *p, struct ptp_message *m)
return; 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; p->log_sync_interval = m->header.logMessageInterval;
clock_sync_interval(p->clock, p->log_sync_interval); clock_sync_interval(p->clock, p->log_sync_interval);
} }