[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -fix
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -fix |
Date: |
Mon, 07 Feb 2022 17:11:43 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 5ae898ac3 -fix
5ae898ac3 is described below
commit 5ae898ac3c23e3103c45a558079f750cddd4c9e1
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Feb 7 17:11:37 2022 +0100
-fix
---
src/gnsrecord/gnsrecord_misc.c | 45 +++++++++++++++++++++++++++++++++---------
1 file changed, 36 insertions(+), 9 deletions(-)
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index 5bf4aa371..c4a39a33d 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -445,45 +445,71 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
* We also want consistent record sets in our local zone(s).
* The only exception is the tombstone (above) which we ignore
* for the consistency check(s).
+ * FIXME: What about shadow records? Should we ignore them?
*/
if (GNUNET_YES == GNUNET_GNSRECORD_is_zonekey_type (rd[i].record_type))
{
- have_zone_delegation = GNUNET_YES;
/* No delegation records under empty label*/
if (have_empty_label)
{
*emsg = GNUNET_strdup (_ (
- "Record set inconsistent: Multiple delegation
records."));
+ "Zone delegation record not allowed in
apex."));
+ return GNUNET_SYSERR;
+ }
+ if ((GNUNET_YES == have_other) ||
+ (GNUNET_YES == have_redirect) ||
+ (GNUNET_YES == have_gns2dns))
+ {
+ *emsg = GNUNET_strdup (_ (
+ "Zone delegation record set contains mutually
exclusive records."));
return GNUNET_SYSERR;
}
+ have_zone_delegation = GNUNET_YES;
}
else if (GNUNET_GNSRECORD_TYPE_REDIRECT == rd[i].record_type)
{
if (GNUNET_YES == have_redirect)
{
*emsg = GNUNET_strdup (_ (
- "Record set inconsistent: Multiple REDIRECT
records."));
+ "Multiple REDIRECT records."));
+ return GNUNET_SYSERR;
+
+ }
+ if ((GNUNET_YES == have_other) ||
+ (GNUNET_YES == have_zone_delegation) ||
+ (GNUNET_YES == have_gns2dns))
+ {
+ *emsg = GNUNET_strdup (_ (
+ "Redirection record set conains mutually
exclusive records."));
return GNUNET_SYSERR;
}
- have_redirect = GNUNET_YES;
/* No redirection records under empty label*/
if (have_empty_label)
{
*emsg = GNUNET_strdup (_ (
- "Record set inconsistent: REDIRECT record
under apex label."));
+ "Redirection records not allowed in apex."));
return GNUNET_SYSERR;
}
+ have_redirect = GNUNET_YES;
}
else if (GNUNET_GNSRECORD_TYPE_GNS2DNS == rd[i].record_type)
{
- have_gns2dns = GNUNET_YES;
/* No gns2dns records under empty label*/
if (have_empty_label)
{
*emsg = GNUNET_strdup (_ (
- "Record set inconsistent: GNS2DNS record
under apex label.\n"));
+ "Redirection records not allowed in
apex..\n"));
+ return GNUNET_SYSERR;
+ }
+ if ((GNUNET_YES == have_other) ||
+ (GNUNET_YES == have_redirect) ||
+ (GNUNET_YES == have_zone_delegation))
+ {
+ *emsg = GNUNET_strdup (_ (
+ "Redirection record set conains mutually
exclusive records."));
return GNUNET_SYSERR;
}
+ have_gns2dns = GNUNET_YES;
}
else
{
@@ -493,10 +519,11 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
(GNUNET_YES == have_redirect) ||
(GNUNET_YES == have_gns2dns))
{
- *emsg = GNUNET_strdup (_("Record set inconsistent: Mutually exclusive
records.\n"));
+ *emsg = GNUNET_strdup (_ (
+ "Mutually exclusive records.\n"));
return GNUNET_SYSERR;
- have_other = GNUNET_YES;
}
+ have_other = GNUNET_YES;
}
/* Ignore private records for public record set */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated: -fix,
gnunet <=