integ/base/linuxptp/centos/patches/0001-p1-Reset-state-when-sw...

26 lines
708 B
Diff

From fe89b71514d21e296988c540ed8a11f98307c36c Mon Sep 17 00:00:00 2001
From: Cole Walker <cole.walker@windriver.com>
Date: Wed, 23 Jun 2021 10:20:19 -0400
Subject: [PATCH 1/6] p1 Reset state when switching port with same best clock
---
clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clock.c b/clock.c
index 9bbcefa..9fad542 100644
--- a/clock.c
+++ b/clock.c
@@ -1737,7 +1737,7 @@ static void handle_state_decision_event(struct clock *c)
cid2str(&best_id));
}
- if (!cid_eq(&best_id, &c->best_id)) {
+ if (!cid_eq(&best_id, &c->best_id) || best != c->best) {
clock_freq_est_reset(c);
tsproc_reset(c->tsproc, 1);
if (!tmv_is_zero(c->initial_delay))
--
2.29.2