From 8ca1414ee4ebfea3023abba098a1a9fe96c5363c Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 22 Nov 2011 09:50:12 +0000 Subject: [PATCH] do not validate own address --- src/transport/gnunet-service-transport_validation.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index 682a46f09..753189c76 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c @@ -628,8 +628,15 @@ add_valid_address (void *cls, GNUNET_break (0); return GNUNET_OK; /* invalid HELLO !? */ } + if (0 == memcmp(&GST_my_identity, &pid, sizeof (struct GNUNET_PeerIdentity))) + { + /* Peerinfo returned own identity, skip validation */ + return GNUNET_OK; + } + ve = find_validation_entry (&public_key, address); ve->valid_until = GNUNET_TIME_absolute_max (ve->valid_until, expiration); + if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task) ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, ve); GNUNET_ATS_address_update (GST_ats, address, NULL, NULL, -- 2.25.1