Do not always wake main thread in bfd_check_detection_timeout if the
entry status is already BFD_STATE_DOWN. This issue can occur when bfd
peer is not responding and entry->last_rx is not updated.

Fixes: 02839c4d89 ("controller: bfd: introduce BFD state machine.")
Signed-off-by: Lorenzo Bianconi <[email protected]>
---
 controller/pinctrl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index cc3edaaf4..15de828b1 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -6862,7 +6862,8 @@ update:
 static void
 bfd_check_detection_timeout(struct bfd_entry *entry)
 {
-    if (entry->state == BFD_STATE_ADMIN_DOWN) {
+    if (entry->state == BFD_STATE_ADMIN_DOWN ||
+        entry->state == BFD_STATE_DOWN) {
         return;
     }
 
-- 
2.31.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to