-check transport-side for connect-to-self
authorChristian Grothoff <christian@grothoff.org>
Mon, 26 Oct 2015 14:48:56 +0000 (14:48 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 26 Oct 2015 14:48:56 +0000 (14:48 +0000)
src/transport/gnunet-service-transport_neighbours.c
src/transport/gnunet-service-transport_validation.c

index db866f5a013466914b35604097ee9fb8fe535181..6664dd332969f009ea867777d4fa9226ee7398c1 100644 (file)
@@ -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;
index d36418cc2df82a83ad371b22103155c340f7ac0e..5470ce8a6afba7ff906a433e38bd94a15bd3e183 100644 (file)
@@ -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;
   }