From bbdbdc3a614060c7d2f156985ae1fb76209cebc9 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 26 Oct 2016 04:20:54 +0000 Subject: [PATCH] - don't complain about AX messages pre-KX --- src/cadet/gnunet-service-cadet_tunnel.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index fc715a419..05cd5f066 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c @@ -2203,10 +2203,13 @@ GCT_handle_encrypted (struct CadetTunnel *t, if (-1 == decrypted_size) { - GNUNET_break_op (0); GNUNET_STATISTICS_update (stats, "# unable to decrypt", 1, GNUNET_NO); - LOG (GNUNET_ERROR_TYPE_WARNING, "Wrong crypto on tunnel %s\n", GCT_2s (t)); - GCT_debug (t, GNUNET_ERROR_TYPE_WARNING); + if (CADET_TUNNEL_KEY_PING <= t->estate) + { + GNUNET_break_op (0); + LOG (GNUNET_ERROR_TYPE_WARNING, "Wrong crypto, tunnel %s\n", GCT_2s (t)); + GCT_debug (t, GNUNET_ERROR_TYPE_WARNING); + } return; } GCT_change_estate (t, CADET_TUNNEL_KEY_OK); -- 2.25.1