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
Miroslav Lichvar 2013-10-11 17:30:29 +02:00 committed by Richard Cochran
parent ea4201298c
commit 52c5e0cfc9
1 changed files with 2 additions and 0 deletions

View File

@ -1155,6 +1155,8 @@ static void handle_state_decision_event(struct clock *c)
if (!cid_eq(&best_id, &c->best_id)) {
clock_freq_est_reset(c);
mave_reset(c->avg_delay);
c->t1 = tmv_zero();
c->t2 = tmv_zero();
c->path_delay = 0;
fresh_best = 1;
}