diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-22 20:09:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-22 20:09:08 +0000 |
commit | 925dc5dabc3df7457f185eff6b5cb401cf7dc60c (patch) | |
tree | 28674b62c8e6b2e512e4537424c909fc7422d312 /src | |
parent | 4d2600ffbfb11951fdca7b5b79976f053f64cc10 (diff) | |
download | gnunet-925dc5dabc3df7457f185eff6b5cb401cf7dc60c.tar.gz gnunet-925dc5dabc3df7457f185eff6b5cb401cf7dc60c.zip |
-amatus says this happens with just new peers, boo
Diffstat (limited to 'src')
-rw-r--r-- | src/core/gnunet-service-core_kx.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index 8e4beac7b..d1990f8f4 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c | |||
@@ -941,7 +941,7 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx, | |||
941 | } | 941 | } |
942 | m = (const struct PingMessage *) msg; | 942 | m = (const struct PingMessage *) msg; |
943 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 943 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
944 | "Core service receives PING request from `%4s'.\n", | 944 | "Core service receives `%s' request from `%4s'.\n", "PING", |
945 | GNUNET_i2s (&kx->peer)); | 945 | GNUNET_i2s (&kx->peer)); |
946 | derive_iv (&iv, &kx->decrypt_key, m->iv_seed, &GSC_my_identity); | 946 | derive_iv (&iv, &kx->decrypt_key, m->iv_seed, &GSC_my_identity); |
947 | if (GNUNET_OK != | 947 | if (GNUNET_OK != |
@@ -953,29 +953,18 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx, | |||
953 | return; | 953 | return; |
954 | } | 954 | } |
955 | if (0 != | 955 | if (0 != |
956 | memcmp (&t.target, | 956 | memcmp (&t.target, &GSC_my_identity, sizeof (struct GNUNET_PeerIdentity))) |
957 | &GSC_my_identity, | ||
958 | sizeof (struct GNUNET_PeerIdentity))) | ||
959 | { | 957 | { |
960 | char sender[5]; | 958 | char sender[9]; |
961 | char peer[5]; | 959 | char peer[9]; |
962 | 960 | ||
963 | GNUNET_snprintf (sender, | 961 | GNUNET_snprintf (sender, sizeof (sender), "%8s", GNUNET_i2s (&kx->peer)); |
964 | sizeof (sender), | 962 | GNUNET_snprintf (peer, sizeof (peer), "%8s", GNUNET_i2s (&t.target)); |
965 | "%4s", | 963 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
966 | GNUNET_i2s (&kx->peer)); | 964 | _ |
967 | GNUNET_snprintf (peer, | 965 | ("Received PING from `%s' for different identity: I am `%s', PONG identity: `%s'\n"), |
968 | sizeof (peer), | 966 | sender, GNUNET_i2s (&GSC_my_identity), peer); |
969 | "%4s", | 967 | GNUNET_break_op (0); |
970 | GNUNET_i2s (&t.target)); | ||
971 | /* demoted ERROR to 'info' for now, as peers running < 0.10 | ||
972 | might be causing these, and we don't want to confuse users */ | ||
973 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
974 | _("Received PING from `%s' for different identity: I am `%s', PONG identity: `%s'\n"), | ||
975 | sender, | ||
976 | GNUNET_i2s (&GSC_my_identity), | ||
977 | peer); | ||
978 | /* GNUNET_break_op (0); */ | ||
979 | return; | 968 | return; |
980 | } | 969 | } |
981 | /* construct PONG */ | 970 | /* construct PONG */ |
@@ -993,7 +982,7 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx, | |||
993 | GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# PONG messages created"), | 982 | GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# PONG messages created"), |
994 | 1, GNUNET_NO); | 983 | 1, GNUNET_NO); |
995 | GSC_NEIGHBOURS_transmit (&kx->peer, &tp.header, | 984 | GSC_NEIGHBOURS_transmit (&kx->peer, &tp.header, |
996 | GNUNET_TIME_UNIT_FOREVER_REL); | 985 | GNUNET_TIME_UNIT_FOREVER_REL /* FIXME: timeout */ ); |
997 | } | 986 | } |
998 | 987 | ||
999 | 988 | ||