From: Christian Grothoff Date: Mon, 26 Oct 2015 14:48:56 +0000 (+0000) Subject: -check transport-side for connect-to-self X-Git-Tag: initial-import-from-subversion-38251~1206 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=019a74602c855ecde0fadeb74176401a3b4ec01c;p=oweals%2Fgnunet.git -check transport-side for connect-to-self --- diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index db866f5a0..6664dd332 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -2193,6 +2193,10 @@ setup_neighbour (const struct GNUNET_PeerIdentity *peer) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Creating new neighbour entry for `%s'\n", GNUNET_i2s (peer)); + GNUNET_assert (0 != + memcmp (&GST_my_identity, + peer, + sizeof (struct GNUNET_PeerIdentity))); n = GNUNET_new (struct NeighbourMapEntry); n->id = *peer; n->ack_state = ACK_UNDEFINED; diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index d36418cc2..5470ce8a6 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c @@ -852,6 +852,11 @@ add_valid_address (void *cls, { /* Why do we try to add an ill-formed address? */ GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Address with %u bytes for plugin %s and peer %s is malformed\n", + (unsigned int) address->address_length, + address->transport_name, + GNUNET_i2s (&pid)); return GNUNET_OK; }