From: Han Zhou <[email protected]>

Currently, whenever there is activity on the session, the FSM is
transitioned to ACTIVE. However, this causes reconnect_force_reconnect()
failed to work once there are traffic received from remote after
transition to RECONNECT, it will skip the reconnection phase and directly
go back to ACTIVE for the old session. This patch fixes it so that
when FSM is in RECONNECT state, it doesn't transition back to ACTIVE
directly.

Signed-off-by: Han Zhou <[email protected]>
---
 lib/reconnect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/reconnect.c b/lib/reconnect.c
index 0f21378..e2901ab 100644
--- a/lib/reconnect.c
+++ b/lib/reconnect.c
@@ -495,7 +495,7 @@ reconnect_connect_failed(struct reconnect *fsm, long long 
int now, int error)
 void
 reconnect_activity(struct reconnect *fsm, long long int now)
 {
-    if (fsm->state != S_ACTIVE) {
+    if (fsm->state != S_ACTIVE && fsm->state != S_RECONNECT) {
         reconnect_transition__(fsm, now, S_ACTIVE);
     }
     fsm->last_activity = now;
-- 
2.1.0

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

Reply via email to