From 1bfb6fd2178c35d163f839b57388a8595144954e Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 26 Aug 2012 20:36:43 +0200 Subject: [PATCH] Warn if the master's time properties are suspicious. Signed-off-by: Richard Cochran --- clock.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clock.c b/clock.c index b5219c2..27ba3c2 100644 --- a/clock.c +++ b/clock.c @@ -276,6 +276,12 @@ static void clock_update_slave(struct clock *c) c->tds.frequencyTraceable = field_is_set(msg, 1, FREQ_TRACEABLE); c->tds.ptpTimescale = field_is_set(msg, 1, PTP_TIMESCALE); c->tds.timeSource = msg->announce.timeSource; + if (!c->tds.ptpTimescale) { + pr_warning("foreign master not using PTP timescale"); + } + if (c->tds.currentUtcOffset < CURRENT_UTC_OFFSET) { + pr_warning("running in a temporal vortex"); + } } static int forwarding(struct clock *c, struct port *p)