distinguish PING failure after rekey from other failures (#4019) when logging
authorChristian Grothoff <christian@grothoff.org>
Thu, 29 Oct 2015 10:00:14 +0000 (10:00 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 29 Oct 2015 10:00:14 +0000 (10:00 +0000)
src/core/gnunet-service-core_kx.c

index 7f4adc2adce9f21bfba454373b8afeaa407c0687..f5ba0c9bc9b37503d20c71dd4e59c56bdfb33429 100644 (file)
@@ -1060,9 +1060,14 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx,
               &GSC_my_identity,
               sizeof (struct GNUNET_PeerIdentity)))
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "We are not the intended target of the PING from peer `%s'\n",
-                GNUNET_i2s (&kx->peer));
+    if (GNUNET_CORE_KX_STATE_REKEY_SENT != kx->status)
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                  "Decryption of PING from peer `%s' failed\n",
+                  GNUNET_i2s (&kx->peer));
+    else
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "Decryption of PING from peer `%s' failed after rekey (harmless)\n",
+                  GNUNET_i2s (&kx->peer));
     GNUNET_break_op (0);
     return;
   }