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
parent
2a89756654
commit
026d422f8f
1
clock.c
1
clock.c
|
@ -1132,6 +1132,7 @@ static void handle_state_decision_event(struct clock *c)
|
||||||
if (!cid_eq(&best->dataset.identity, &c->best_id)) {
|
if (!cid_eq(&best->dataset.identity, &c->best_id)) {
|
||||||
clock_freq_est_reset(c);
|
clock_freq_est_reset(c);
|
||||||
mave_reset(c->avg_delay);
|
mave_reset(c->avg_delay);
|
||||||
|
c->path_delay = 0;
|
||||||
fresh_best = 1;
|
fresh_best = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue