//TODO This will be removed in a major release, because this will be a protocol breaking change. We set the deprecated 'reliable' bit here that was removed.
create_msg->options = 2;
create_msg->cid = cc->cid;
+
+ // check for tunnel state and define tunnel_up (xrs,t3ss)
+ t = GCP_get_tunnel (cc->destination, GNUNET_YES);
+ create_msg->tunnel_up = (t->estate == CADET_TUNNEL_KEY_UNINITIALIZED)? GNUNET_NO : GNUNET_YES;
+
pids = (struct GNUNET_PeerIdentity *) &create_msg[1];
pids[0] = my_full_id;
for (unsigned int i = 0; i <= cc->off; i++)
uint16_t size = ntohs (msg->header.size) - sizeof (*msg);
unsigned int path_length;
unsigned int off;
+ struct CadetTunnel *t;
path_length = size / sizeof (struct GNUNET_PeerIdentity);
if (0 == path_length)
GCP_2s (origin),
GNUNET_sh2s (&msg->cid.connection_of_tunnel));
path = GCPP_get_path_from_route (path_length - 1, pids);
+ t = GCP_get_tunnel (orgin, GNUNET_YES);
+
+ // Check for CADET state in case the other side has lost the tunnel (xrs,t3ss)
+ if ((GNUNET_NO == msg->tunnel_up) &&
+ (CADET_TUNNEL_KEY_OK == t->estate))
+ {
+ t->estate = CADET_TUNNEL_KEY_UNINITIALIZED;
+ }
+
if (GNUNET_OK !=
- GCT_add_inbound_connection (GCP_get_tunnel (origin, GNUNET_YES),
+ GCT_add_inbound_connection (t,
&msg->cid,
path))
{