diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-10-09 14:56:22 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-10-09 14:56:22 +0200 |
commit | b7ef945fa5c5926e6eb457a472115263c0170f8f (patch) | |
tree | 15931956cdb6959ae0f062ea45d8e660646dcb65 /src/namestore | |
parent | ed07d0c162984ddedc9399744e7736a101d3df2b (diff) | |
download | gnunet-b7ef945fa5c5926e6eb457a472115263c0170f8f.tar.gz gnunet-b7ef945fa5c5926e6eb457a472115263c0170f8f.zip |
check namestore only sends relevant replies to monitor
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/namestore_api_monitor.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 | |||
129 | check_result (void *cls, | 129 | check_result (void *cls, |
130 | const struct RecordResultMessage *lrm) | 130 | const struct RecordResultMessage *lrm) |
131 | { | 131 | { |
132 | struct GNUNET_NAMESTORE_ZoneMonitor *zm = cls; | ||
132 | size_t lrm_len; | 133 | size_t lrm_len; |
133 | size_t exp_lrm_len; | 134 | size_t exp_lrm_len; |
134 | size_t name_len; | 135 | size_t name_len; |
@@ -138,6 +139,13 @@ check_result (void *cls, | |||
138 | const char *rd_ser_tmp; | 139 | const char *rd_ser_tmp; |
139 | 140 | ||
140 | (void) cls; | 141 | (void) cls; |
142 | if (0 != memcmp (&lrm->private_key, | ||
143 | &zm->zone, | ||
144 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) | ||
145 | { | ||
146 | GNUNET_break (0); | ||
147 | return GNUNET_SYSERR; | ||
148 | } | ||
141 | lrm_len = ntohs (lrm->gns_header.header.size); | 149 | lrm_len = ntohs (lrm->gns_header.header.size); |
142 | rd_len = ntohs (lrm->rd_len); | 150 | rd_len = ntohs (lrm->rd_len); |
143 | rd_count = ntohs (lrm->rd_count); | 151 | rd_count = ntohs (lrm->rd_count); |