Don't calculate delay with old master's sync time stamp.
When a new master is selected, drop the old sync time stamp to prevent calculating invalid delay in case delay_resp will be received before first sync from the new master. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>master
parent
ea4201298c
commit
52c5e0cfc9
2
clock.c
2
clock.c
|
@ -1155,6 +1155,8 @@ static void handle_state_decision_event(struct clock *c)
|
||||||
if (!cid_eq(&best_id, &c->best_id)) {
|
if (!cid_eq(&best_id, &c->best_id)) {
|
||||||
clock_freq_est_reset(c);
|
clock_freq_est_reset(c);
|
||||||
mave_reset(c->avg_delay);
|
mave_reset(c->avg_delay);
|
||||||
|
c->t1 = tmv_zero();
|
||||||
|
c->t2 = tmv_zero();
|
||||||
c->path_delay = 0;
|
c->path_delay = 0;
|
||||||
fresh_best = 1;
|
fresh_best = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue