summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-14 18:01:12 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-14 18:01:12 +0100
commita74ce8e7ad39f892aead93d8e25c87d139108bde (patch)
tree630f9dd5a80b7aab3611baa4208d17b39c200153 /src/transport/gnunet-service-transport_neighbours.c
parent15719eac76fb675260f08437fd4094b4ed7a9cc1 (diff)
trying to fix issue reported by Lurchi
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index d82112e03..e1e4f56f8 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -2236,6 +2236,14 @@ GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message,
scm = (const struct TransportSynMessage *) message;
GNUNET_break_op (0 == ntohl (scm->reserved));
ts = GNUNET_TIME_absolute_ntoh (scm->timestamp);
+ if (0 ==
+ memcmp (&GST_my_identity,
+ peer,
+ sizeof (struct GNUNET_PeerIdentity)))
+ {
+ /* loopback connection-to-self, ignore */
+ return GNUNET_SYSERR;
+ }
n = lookup_neighbour (peer);
if (NULL == n)
{