ptp4l: Reset path delay when new master is selected.

When a new master is selected, drop the old path delay and don't
calculate the offset until the delay is measured again with the new
master.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
master
Miroslav Lichvar 2013-05-28 14:27:38 +02:00 committed by Richard Cochran
parent 2a89756654
commit 026d422f8f
1 changed files with 1 additions and 0 deletions

View File

@ -1132,6 +1132,7 @@ static void handle_state_decision_event(struct clock *c)
if (!cid_eq(&best->dataset.identity, &c->best_id)) {
clock_freq_est_reset(c);
mave_reset(c->avg_delay);
c->path_delay = 0;
fresh_best = 1;
}