From b268cf048b8f07c269d357623651f949903ed2bb Mon Sep 17 00:00:00 2001 From: Delio Brignoli Date: Wed, 21 Aug 2013 14:09:51 +0200 Subject: [PATCH] Do not qualify announce messages with stepsRemoved >= 255 See IEEE1588-2008 section 9.3.2.5 (d) Signed-off-by: Delio Brignoli --- port.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/port.c b/port.c index 3e7a6c3..6644685 100644 --- a/port.c +++ b/port.c @@ -1382,6 +1382,13 @@ struct dataset *port_best_foreign(struct port *port) static int process_announce(struct port *p, struct ptp_message *m) { int result = 0; + + /* Do not qualify announce messages with stepsRemoved >= 255, see + * IEEE1588-2008 section 9.3.2.5 (d) + */ + if (m->announce.stepsRemoved >= 255) + return result; + switch (p->state) { case PS_INITIALIZING: case PS_FAULTY: