From: Christian Grothoff Date: Tue, 9 Oct 2018 12:56:22 +0000 (+0200) Subject: check namestore only sends relevant replies to monitor X-Git-Tag: v0.11.0~238^2~84^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b7ef945fa5c5926e6eb457a472115263c0170f8f;p=oweals%2Fgnunet.git check namestore only sends relevant replies to monitor --- 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);