aboutsummaryrefslogtreecommitdiff
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
parentfe4f50298fe81bdf8b7664701c241f46ce80c3fd (diff)
downloadgnunet-371e38e9f5062c1474ec21232f60ce9ef3a7b764.tar.gz
gnunet-371e38e9f5062c1474ec21232f60ce9ef3a7b764.zip
fix KX in Cadet for revocation-style sequencing
-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 dbd84a818..5c52eb616 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,
2048 Nothing to do here. */ 2048 Nothing to do here. */
2049 break; 2049 break;
2050 } 2050 }
2051 if (0 != (GNUNET_CADET_KX_FLAG_FORCE_REPLY & ntohl (msg->kx.flags)))
2052 {
2053 send_kx_auth (t,
2054 NULL,
2055 &t->ax,
2056 GNUNET_NO);
2057 }
2051} 2058}
2052 2059
2053 2060
@@ -2422,8 +2429,6 @@ connection_ready_cb (void *cls,
2422 { 2429 {
2423 case CADET_TUNNEL_KEY_UNINITIALIZED: 2430 case CADET_TUNNEL_KEY_UNINITIALIZED:
2424 /* Do not begin KX if WE have no channels waiting! */ 2431 /* Do not begin KX if WE have no channels waiting! */
2425 if (0 == GCT_count_channels (t))
2426 return;
2427 if (0 != GNUNET_TIME_absolute_get_remaining (t->next_kx_attempt).rel_value_us) 2432 if (0 != GNUNET_TIME_absolute_get_remaining (t->next_kx_attempt).rel_value_us)
2428 return; /* wait for timeout before retrying */ 2433 return; /* wait for timeout before retrying */
2429 /* We are uninitialized, just transmit immediately, 2434 /* We are uninitialized, just transmit immediately,
@@ -2436,6 +2441,15 @@ connection_ready_cb (void *cls,
2436 send_kx (t, 2441 send_kx (t,
2437 ct, 2442 ct,
2438 &t->ax); 2443 &t->ax);
2444 if ( (0 ==
2445 GCT_count_channels (t)) &&
2446 (NULL == t->destroy_task) )
2447 {
2448 t->destroy_task
2449 = GNUNET_SCHEDULER_add_delayed (IDLE_DESTROY_DELAY,
2450 &destroy_tunnel,
2451 t);
2452 }
2439 break; 2453 break;
2440 case CADET_TUNNEL_KEY_AX_RECV: 2454 case CADET_TUNNEL_KEY_AX_RECV:
2441 case CADET_TUNNEL_KEY_AX_SENT: 2455 case CADET_TUNNEL_KEY_AX_SENT: