From 9bd83961538e2fbbdcbe04318adbe5af4ce919ca Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 12 Apr 2010 20:38:21 +0000 Subject: [PATCH] stuff --- TODO | 8 ++++++-- src/core/gnunet-service-core.c | 7 ++++++- src/include/gnunet_signatures.h | 4 ++-- src/peerinfo/peerinfo_api.c | 10 +++------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/TODO b/TODO index cd1212d2a..0bc5c43f9 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,10 @@ 0.9.0pre0 [April]: -* NAT: peer behind NAT fails to bootstrap: we never get a session key from the other peer - (but we DO get a PONG to our PING!) [CG] +* TRANSPORT: inbound sessions are not properly PING-PONG validated, + connect-event is then not properly signalled (peer behind NAT + never gets a 'connect' message) and finally we DO transmit + data messages over the invalidated, only half-connect-signalled + channel (which confuses the core state machine, or now causes + transport-api assertion failures). [CG] * FS-acceptance testing [CG] * Release checks: - portability diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index a9bc13288..044b7496e 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -2454,8 +2454,13 @@ send_key (struct Neighbour *n) #endif return; /* already in progress */ } - if (! n->is_connected) + if (GNUNET_YES != n->is_connected) { +#if DEBUG_CORE + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Not yet connected to peer `%4s'!\n", + GNUNET_i2s (&n->peer)); +#endif if (NULL == n->th) { GNUNET_STATISTICS_update (stats, diff --git a/src/include/gnunet_signatures.h b/src/include/gnunet_signatures.h index 29da16b42..0dd795dd2 100644 --- a/src/include/gnunet_signatures.h +++ b/src/include/gnunet_signatures.h @@ -43,9 +43,9 @@ extern "C" #define GNUNET_SIGNATURE_PURPOSE_TEST 0 /** - * Signature for confirming HELLOs for TCP plugins. + * Signature for confirming HELLOs for transport. */ -#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_TCP_PING 1 +#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PING 1 /** diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index 2a7c990e4..6fd538f0d 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c @@ -216,15 +216,11 @@ info_handler (void *cls, const struct GNUNET_MessageHeader *msg) } #if DEBUG_PEERINFO GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Received information about peer `%s' from peerinfo database\n", + "Received %u bytes of `%s' information about peer `%s' from PEERINFO database\n", + (hello == NULL) ? 0 : (unsigned int) GNUNET_HELLO_size (hello), + "HELLO", GNUNET_i2s (&im->peer)); #endif -#if DEBUG_PEERINFO - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Size of `%s' is %u bytes\n", - "HELLO", - (hello == NULL) ? 0 : (unsigned int) GNUNET_HELLO_size (hello)); -#endif ic->callback (ic->callback_cls, &im->peer, hello, ntohl (im->trust)); GNUNET_CLIENT_receive (ic->client, &info_handler, -- 2.25.1