summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_validation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-26 17:15:14 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-26 17:15:14 +0000
commitdf25cbb3de762201f1635fa6e4c1f5b42e2052af (patch)
tree9eff8c51bdb01be8412f8e31eb34f5738d002272 /src/transport/gnunet-service-transport_validation.c
parentc63037c23149600f47f6269498b65b187526cd05 (diff)
-ignore PING/PONG from self
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r--src/transport/gnunet-service-transport_validation.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 5470ce8a6..9b69b5ddd 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -1060,6 +1060,11 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
ssize_t ret;
struct GNUNET_HELLO_Address address;
+ if (0 ==
+ memcmp (&GST_my_identity,
+ sender,
+ sizeof (struct GNUNET_PeerIdentity)))
+ return; /* our own, ignore! */
if (ntohs (hdr->size) < sizeof (struct TransportPingMessage))
{
GNUNET_break_op (0);
@@ -1388,6 +1393,12 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
int sig_res;
int do_verify;
+ if (0 ==
+ memcmp (&GST_my_identity,
+ sender,
+ sizeof (struct GNUNET_PeerIdentity)))
+ return; /* our own, ignore! */
+
if (ntohs (hdr->size) < sizeof (struct TransportPongMessage))
{
GNUNET_break_op (0);