- don't allow ACKs to change KX state
authorBart Polot <bart@net.in.tum.de>
Thu, 7 Nov 2013 18:32:28 +0000 (18:32 +0000)
committerBart Polot <bart@net.in.tum.de>
Thu, 7 Nov 2013 18:32:28 +0000 (18:32 +0000)
src/mesh/gnunet-service-mesh_connection.c

index d529934eb27b4a28ce3cbc5b5d97be046f8491b4..e20b4e9db07cfe8d875f114247b7cb47c85bfc38 100644 (file)
@@ -1214,7 +1214,8 @@ GMC_handle_confirm (void *cls, const struct GNUNET_PeerIdentity *peer,
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  Connection (SYN)ACK for us!\n");
     connection_change_state (c, MESH_CONNECTION_READY);
-    GMT_change_state (c->t, MESH_TUNNEL3_READY);
+    if (MESH_TUNNEL3_WAITING == GMT_get_state (c->t))
+      GMT_change_state (c->t, MESH_TUNNEL3_READY);
     send_connection_ack (c, GNUNET_YES);
     return GNUNET_OK;
   }