aboutsummaryrefslogtreecommitdiff
path: root/src/zonemaster
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-02-05 18:56:01 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-02-05 18:56:01 +0100
commit2c3a47c48049f78a9ce467f21dff20ae3a0ae494 (patch)
tree604a9b373e1d9048d07f4b2436fd08afbbec91f0 /src/zonemaster
parentaa85ac347e31b22bcd86c6fbe9875dc4ffa93229 (diff)
downloadgnunet-2c3a47c48049f78a9ce467f21dff20ae3a0ae494.tar.gz
gnunet-2c3a47c48049f78a9ce467f21dff20ae3a0ae494.zip
-fix issue with tombstone deletion when records are added
Diffstat (limited to 'src/zonemaster')
-rw-r--r--src/zonemaster/gnunet-service-zonemaster-monitor.c4
-rw-r--r--src/zonemaster/gnunet-service-zonemaster.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/zonemaster/gnunet-service-zonemaster-monitor.c b/src/zonemaster/gnunet-service-zonemaster-monitor.c
index 081398f0e..b51d1cb97 100644
--- a/src/zonemaster/gnunet-service-zonemaster-monitor.c
+++ b/src/zonemaster/gnunet-service-zonemaster-monitor.c
@@ -265,13 +265,13 @@ convert_records_for_export (const struct GNUNET_GNSRECORD_Data *rd,
265 now = GNUNET_TIME_absolute_get (); 265 now = GNUNET_TIME_absolute_get ();
266 for (unsigned int i = 0; i < rd_count; i++) 266 for (unsigned int i = 0; i < rd_count; i++)
267 { 267 {
268 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE))
269 continue;
270 if (GNUNET_GNSRECORD_TYPE_TOMBSTONE == rd[i].record_type) 268 if (GNUNET_GNSRECORD_TYPE_TOMBSTONE == rd[i].record_type)
271 { 269 {
272 tombstone = rd[i].data; 270 tombstone = rd[i].data;
273 continue; 271 continue;
274 } 272 }
273 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE))
274 continue;
275 if ((0 == (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) && 275 if ((0 == (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) &&
276 (rd[i].expiration_time < now.abs_value_us)) 276 (rd[i].expiration_time < now.abs_value_us))
277 continue; /* record already expired, skip it */ 277 continue; /* record already expired, skip it */
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c
index e478ceeab..3a8ac4be1 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -596,14 +596,13 @@ convert_records_for_export (const struct GNUNET_GNSRECORD_Data *rd,
596 now = GNUNET_TIME_absolute_get (); 596 now = GNUNET_TIME_absolute_get ();
597 for (unsigned int i = 0; i < rd_count; i++) 597 for (unsigned int i = 0; i < rd_count; i++)
598 { 598 {
599 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE))
600 continue;
601 /* Should always be private but just to be sure */
602 if (GNUNET_GNSRECORD_TYPE_TOMBSTONE == rd[i].record_type) 599 if (GNUNET_GNSRECORD_TYPE_TOMBSTONE == rd[i].record_type)
603 { 600 {
604 tombstone = rd[i].data; 601 tombstone = rd[i].data;
605 continue; 602 continue;
606 } 603 }
604 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE))
605 continue;
607 if ((0 == (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) && 606 if ((0 == (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) &&
608 (rd[i].expiration_time < now.abs_value_us)) 607 (rd[i].expiration_time < now.abs_value_us))
609 continue; /* record already expired, skip it */ 608 continue; /* record already expired, skip it */