-randomize ps each time
authorChristian Grothoff <christian@grothoff.org>
Sun, 25 Oct 2015 15:45:03 +0000 (15:45 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 25 Oct 2015 15:45:03 +0000 (15:45 +0000)
src/core/gnunet-service-core_kx.c

index 931125a97beab7315da0a703e25e0ecb46d4f5f2..ac6559588e54eab219b7a23bc166caca00746201 100644 (file)
@@ -687,6 +687,8 @@ setup_fresh_ping (struct GSC_KeyExchangeInfo *kx)
   struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
 
   pm = &kx->ping;
+  kx->ping_challenge = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+                                                 UINT32_MAX);
   pm->header.size = htons (sizeof (struct PingMessage));
   pm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_PING);
   pm->iv_seed = calculate_seed (kx);