From a380afc482e70bc4f7c2ac150598abc8d6c941dd Mon Sep 17 00:00:00 2001 From: Erik Hons Date: Tue, 4 Feb 2020 22:34:24 +0000 Subject: [PATCH] clock: reset master/local rr when best clock id changes This fixes an issue with free running clocks. When the master clock id changes the measured master/local ratio should be reset. If it isn't, and the local clock becomes master, then the last measured ratio to the old master continues to be used in peer delay calculations. If a bad master/local ration calculation triggers this state change the port can get "stuck" in not "asCapable" mode. Signed-off-by: Erik Hons --- clock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/clock.c b/clock.c index b210649..9f4207d 100644 --- a/clock.c +++ b/clock.c @@ -1775,6 +1775,7 @@ static void handle_state_decision_event(struct clock *c) tsproc_set_delay(c->tsproc, c->initial_delay); c->ingress_ts = tmv_zero(); c->path_delay = c->initial_delay; + c->master_local_rr = 1.0; c->nrr = 1.0; fresh_best = 1; }