From 70cf6979e8ee4221b20c00d59b9b30cea8c8ee32 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 1 Feb 2017 16:49:06 +0100 Subject: [PATCH] log if we get a redundant KX_AUTH, do not assert --- src/cadet/gnunet-service-cadet-new_tunnels.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index 32ddf2984..ffc38af18 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c @@ -1804,7 +1804,17 @@ GCT_handle_kx_auth (struct CadetTConnection *ct, GCP_get_id (t->destination), &msg->kx.ephemeral_key, &msg->kx.ratchet_key); - GNUNET_break (GNUNET_OK == ret); + if (GNUNET_OK != ret) + { + if (GNUNET_NO == ret) + GNUNET_STATISTICS_update (stats, + "# redundant KX_AUTH received", + 1, + GNUNET_NO); + else + GNUNET_break (0); /* connect to self!? */ + return; + } GNUNET_CRYPTO_hash (&ax_tmp.RK, sizeof (ax_tmp.RK), &kx_auth); -- 2.25.1