- don't complain about AX messages pre-KX
authorBart Polot <bart@net.in.tum.de>
Wed, 26 Oct 2016 04:20:54 +0000 (04:20 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 26 Oct 2016 04:20:54 +0000 (04:20 +0000)
src/cadet/gnunet-service-cadet_tunnel.c

index fc715a419da421a3ee9d8a9669ff112b2e0ca471..05cd5f066c91fa41912caba4a4a987db3d9690d3 100644 (file)
@@ -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);