aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Durner <durner@gnunet.org>2010-10-01 19:21:19 +0000
committerNils Durner <durner@gnunet.org>2010-10-01 19:21:19 +0000
commit279f279758af620fbfc490521bff37407e7c4591 (patch)
treee6453bc414ba166a97520b8463e2037256333fa0
parent0298b666ff94244bff2e1549501a2cef072afa06 (diff)
downloadgnunet-279f279758af620fbfc490521bff37407e7c4591.tar.gz
gnunet-279f279758af620fbfc490521bff37407e7c4591.zip
reintroduce seeds, fix calculations
-rw-r--r--src/core/gnunet-service-core.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index 6e5a907b6..9496d2209 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -228,8 +228,7 @@ struct PingMessage
228 /** 228 /**
229 * Seed for the IV 229 * Seed for the IV
230 */ 230 */
231 /* FIXME: Does adding this member break things (why?) */ 231 uint32_t iv_seed GNUNET_PACKED;
232 /*uint32_t iv_seed GNUNET_PACKED;*/
233 232
234 /** 233 /**
235 * Random number chosen to make reply harder. 234 * Random number chosen to make reply harder.
@@ -259,8 +258,7 @@ struct PongMessage
259 /** 258 /**
260 * Seed for the IV 259 * Seed for the IV
261 */ 260 */
262 /* FIXME: Does adding this member break things (why?) */ 261 uint32_t iv_seed GNUNET_PACKED;
263 /*uint32_t iv_seed GNUNET_PACKED;*/
264 262
265 /** 263 /**
266 * Random number proochosen to make reply harder. Must be 264 * Random number proochosen to make reply harder. Must be
@@ -1324,7 +1322,7 @@ send_keep_alive (void *cls,
1324 &pp.challenge, 1322 &pp.challenge,
1325 &pm->challenge, 1323 &pm->challenge,
1326 sizeof (struct PingMessage) - 1324 sizeof (struct PingMessage) -
1327 sizeof (struct GNUNET_MessageHeader)); 1325 ((void *) &pm->challenge - (void *) pm));
1328 process_encrypted_neighbour_queue (n); 1326 process_encrypted_neighbour_queue (n);
1329 /* reschedule PING job */ 1327 /* reschedule PING job */
1330 left = GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_add (n->last_activity, 1328 left = GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_add (n->last_activity,
@@ -2733,7 +2731,7 @@ send_key (struct Neighbour *n)
2733 &pp.challenge, 2731 &pp.challenge,
2734 &pm->challenge, 2732 &pm->challenge,
2735 sizeof (struct PingMessage) - 2733 sizeof (struct PingMessage) -
2736 sizeof (struct GNUNET_MessageHeader)); 2734 ((void *) &pm->challenge - (void *) pm));
2737 GNUNET_STATISTICS_update (stats, 2735 GNUNET_STATISTICS_update (stats,
2738 gettext_noop ("# SET_KEY and PING messages created"), 2736 gettext_noop ("# SET_KEY and PING messages created"),
2739 1, 2737 1,
@@ -2849,7 +2847,7 @@ handle_ping (struct Neighbour *n, const struct PingMessage *m)
2849 &m->challenge, 2847 &m->challenge,
2850 &t.challenge, 2848 &t.challenge,
2851 sizeof (struct PingMessage) - 2849 sizeof (struct PingMessage) -
2852 sizeof (struct GNUNET_MessageHeader))) 2850 ((void *) &m->challenge - (void *) m)))
2853 return; 2851 return;
2854#if DEBUG_HANDSHAKE 2852#if DEBUG_HANDSHAKE
2855 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2853 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2890,7 +2888,7 @@ handle_ping (struct Neighbour *n, const struct PingMessage *m)
2890 &tx.challenge, 2888 &tx.challenge,
2891 &tp->challenge, 2889 &tp->challenge,
2892 sizeof (struct PongMessage) - 2890 sizeof (struct PongMessage) -
2893 sizeof (struct GNUNET_MessageHeader)); 2891 ((void *) &tp->challenge - (void *) tp));
2894 GNUNET_STATISTICS_update (stats, 2892 GNUNET_STATISTICS_update (stats,
2895 gettext_noop ("# PONG messages created"), 2893 gettext_noop ("# PONG messages created"),
2896 1, 2894 1,
@@ -2933,7 +2931,7 @@ handle_pong (struct Neighbour *n,
2933 &m->challenge, 2931 &m->challenge,
2934 &t.challenge, 2932 &t.challenge,
2935 sizeof (struct PongMessage) - 2933 sizeof (struct PongMessage) -
2936 sizeof (struct GNUNET_MessageHeader))) 2934 ((void *) &m->challenge - (void *) m)))
2937 { 2935 {
2938 GNUNET_break_op (0); 2936 GNUNET_break_op (0);
2939 return; 2937 return;