[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26260 - gnunet/src/core
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26260 - gnunet/src/core |
Date: |
Sat, 2 Mar 2013 23:40:58 +0100 |
Author: grothoff
Date: 2013-03-02 23:40:58 +0100 (Sat, 02 Mar 2013)
New Revision: 26260
Modified:
gnunet/src/core/gnunet-service-core_kx.c
Log:
do not verify an ephemeral key again if it is the same as the previous key
Modified: gnunet/src/core/gnunet-service-core_kx.c
===================================================================
--- gnunet/src/core/gnunet-service-core_kx.c 2013-03-02 22:19:19 UTC (rev
26259)
+++ gnunet/src/core/gnunet-service-core_kx.c 2013-03-02 22:40:58 UTC (rev
26260)
@@ -743,6 +743,18 @@
return;
}
m = (const struct EphemeralKeyMessage *) msg;
+ end_t = GNUNET_TIME_absolute_ntoh (m->expiration_time);
+ if ( ( (KX_STATE_KEY_RECEIVED == kx->status) ||
+ (KX_STATE_UP == kx->status) ||
+ (KX_STATE_REKEY_SENT == kx->status) ) &&
+ (end_t.abs_value <= kx->foreign_key_expires.abs_value) )
+ {
+ GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# old ephemeral keys
ignored"),
+ 1, GNUNET_NO);
+ return;
+ }
+ start_t = GNUNET_TIME_absolute_ntoh (m->creation_time);
+
GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# ephemeral keys
received"),
1, GNUNET_NO);
@@ -774,8 +786,6 @@
GNUNET_break_op (0);
return;
}
- start_t = GNUNET_TIME_absolute_ntoh (m->creation_time);
- end_t = GNUNET_TIME_absolute_ntoh (m->expiration_time);
now = GNUNET_TIME_absolute_get ();
if ( (end_t.abs_value < GNUNET_TIME_absolute_subtract (now,
REKEY_TOLERANCE).abs_value) ||
(start_t.abs_value > GNUNET_TIME_absolute_add (now,
REKEY_TOLERANCE).abs_value) )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26260 - gnunet/src/core,
gnunet <=