From b7ef945fa5c5926e6eb457a472115263c0170f8f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 9 Oct 2018 14:56:22 +0200 Subject: [PATCH] check namestore only sends relevant replies to monitor --- src/namestore/namestore_api_monitor.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c index 6c441d786..2c4c4559d 100644 --- a/src/namestore/namestore_api_monitor.c +++ b/src/namestore/namestore_api_monitor.c @@ -129,6 +129,7 @@ static int check_result (void *cls, const struct RecordResultMessage *lrm) { + struct GNUNET_NAMESTORE_ZoneMonitor *zm = cls; size_t lrm_len; size_t exp_lrm_len; size_t name_len; @@ -138,6 +139,13 @@ check_result (void *cls, const char *rd_ser_tmp; (void) cls; + if (0 != memcmp (&lrm->private_key, + &zm->zone, + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } lrm_len = ntohs (lrm->gns_header.header.size); rd_len = ntohs (lrm->rd_len); rd_count = ntohs (lrm->rd_count); -- 2.25.1