On Mon, Jul 24, 2017 at 06:38:19PM +0200, Richard Cochran wrote:
> This patch fixes the issue by remembering the UTC offset when assuming
> the slave role.

> @@ -658,6 +658,11 @@ static void clock_update_slave(struct clock *c)
>       if (c->tds.currentUtcOffset < c->utc_offset) {
>               pr_warning("running in a temporal vortex");
>       }
> +     if ((c->tds.flags & UTC_OFF_VALID && c->tds.flags & TIME_TRACEABLE) ||
> +         (c->tds.currentUtcOffset > c->utc_offset)) {
> +             pr_info("updating UTC offset to %d", c->tds.currentUtcOffset);
> +             c->utc_offset = c->tds.currentUtcOffset;

I'm wondering what will happen if a buggy/misconfigured master is
briefly running with an UTC offset larger than the current offset.
Will the slaves be stuck with the wrong offset? Should be that ">"
operator replaced with "!="?

-- 
Miroslav Lichvar

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to