From df25cbb3de762201f1635fa6e4c1f5b42e2052af Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 26 Oct 2015 17:15:14 +0000 Subject: [PATCH] -ignore PING/PONG from self --- src/transport/gnunet-service-transport_validation.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- 2.25.1