aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-05 16:05:55 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-05 16:05:55 +0200
commit371e38e9f5062c1474ec21232f60ce9ef3a7b764 (patch)
tree1603189177b080d4f291df29bdde28b94a20f0af /src
parentfe4f50298fe81bdf8b7664701c241f46ce80c3fd (diff)
fix KX in Cadet for revocation-style sequencing
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_tunnels.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet_tunnels.c b/src/cadet/gnunet-service-cadet_tunnels.c
index dbd84a8185..5c52eb6164 100644
--- a/src/cadet/gnunet-service-cadet_tunnels.c
+++ b/src/cadet/gnunet-service-cadet_tunnels.c
@@ -2048,6 +2048,13 @@ GCT_handle_kx_auth (struct CadetTConnection *ct,
Nothing to do here. */
break;
}
+ if (0 != (GNUNET_CADET_KX_FLAG_FORCE_REPLY & ntohl (msg->kx.flags)))
+ {
+ send_kx_auth (t,
+ NULL,
+ &t->ax,
+ GNUNET_NO);
+ }
}
@@ -2422,8 +2429,6 @@ connection_ready_cb (void *cls,
{
case CADET_TUNNEL_KEY_UNINITIALIZED:
/* Do not begin KX if WE have no channels waiting! */
- if (0 == GCT_count_channels (t))
- return;
if (0 != GNUNET_TIME_absolute_get_remaining (t->next_kx_attempt).rel_value_us)
return; /* wait for timeout before retrying */
/* We are uninitialized, just transmit immediately,
@@ -2436,6 +2441,15 @@ connection_ready_cb (void *cls,
send_kx (t,
ct,
&t->ax);
+ if ( (0 ==
+ GCT_count_channels (t)) &&
+ (NULL == t->destroy_task) )
+ {
+ t->destroy_task
+ = GNUNET_SCHEDULER_add_delayed (IDLE_DESTROY_DELAY,
+ &destroy_tunnel,
+ t);
+ }
break;
case CADET_TUNNEL_KEY_AX_RECV:
case CADET_TUNNEL_KEY_AX_SENT: