From 026d422f8feedb5b8b87a0b9b0a5e07200aa686a Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 28 May 2013 14:27:38 +0200 Subject: [PATCH] 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 --- clock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/clock.c b/clock.c index eceedc5..0353b5a 100644 --- a/clock.c +++ b/clock.c @@ -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; }