aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-07-15 11:45:13 +0000
committerBart Polot <bart@net.in.tum.de>2015-07-15 11:45:13 +0000
commit7d0c18e4ff5cb21baa7ba3d0dc917e4d18047512 (patch)
tree53ec4d947e3f18764b0ecae096bff5265eaea7c1 /src
parent860c506ef87aa8324812fa2fca41515c9f8a12fd (diff)
downloadgnunet-7d0c18e4ff5cb21baa7ba3d0dc917e4d18047512.tar.gz
gnunet-7d0c18e4ff5cb21baa7ba3d0dc917e4d18047512.zip
- send payload on AX key receive
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_tunnel.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c
index aad80af0b..8fa13dffd 100644
--- a/src/cadet/gnunet-service-cadet_tunnel.c
+++ b/src/cadet/gnunet-service-cadet_tunnel.c
@@ -624,10 +624,15 @@ static int
624is_ready (struct CadetTunnel *t) 624is_ready (struct CadetTunnel *t)
625{ 625{
626 int ready; 626 int ready;
627 627 int conn_ok;
628 ready = CADET_TUNNEL_READY == t->cstate 628 int enc_ok;
629 && (CADET_TUNNEL_KEY_OK == t->estate 629
630 || CADET_TUNNEL_KEY_REKEY == t->estate); 630 conn_ok = CADET_TUNNEL_READY == t->cstate;
631 enc_ok = CADET_TUNNEL_KEY_OK == t->estate
632 || CADET_TUNNEL_KEY_REKEY == t->estate
633 || (CADET_TUNNEL_KEY_PING == t->estate
634 && CADET_Axolotl == t->enc_type);
635 ready = conn_ok && enc_ok;
631 ready = ready || GCT_is_loopback (t); 636 ready = ready || GCT_is_loopback (t);
632 return ready; 637 return ready;
633} 638}
@@ -2977,6 +2982,8 @@ handle_kx_ax (struct CadetTunnel *t, const struct GNUNET_CADET_AX_KX *msg)
2977 ax->ratchet_expiration = 2982 ax->ratchet_expiration =
2978 GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get(), ratchet_time); 2983 GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get(), ratchet_time);
2979 } 2984 }
2985 GCT_change_estate (t, CADET_TUNNEL_KEY_PING);
2986 send_queued_data (t);
2980} 2987}
2981 2988
2982 2989