rconn_get_connection_seqno() is documented to change only when an rconn
connects or disconnnects, but in fact it was also changing whenever an
rconn went into or out of the "idle" state (following sending an echo
request).  This fixes the problem.

rconn_get_connection_seqno() didn't have any existing users, but an
upcoming commit adds one.

Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 lib/rconn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rconn.c b/lib/rconn.c
index 6692b46..a4a5dbf 100644
--- a/lib/rconn.c
+++ b/lib/rconn.c
@@ -1267,7 +1267,7 @@ static void
 state_transition(struct rconn *rc, enum state state)
     OVS_REQUIRES(rc->mutex)
 {
-    rc->seqno += (rc->state == S_ACTIVE) != (state == S_ACTIVE);
+    rc->seqno += is_connected_state(rc->state) != is_connected_state(state);
     if (is_connected_state(state) && !is_connected_state(rc->state)) {
         rc->probably_admitted = false;
     }
-- 
2.1.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to