From: Matthijs Mekking Date: Mon, 2 Nov 2009 12:38:27 +0000 (+0000) Subject: if under or at subdomain, it is glue, otherwise it is in zone (assumption: out of... X-Git-Tag: release-1.6.2~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=899f3b2fc485ed708f928d4483428a3aa71fc6cf;p=thirdparty%2Fldns.git if under or at subdomain, it is glue, otherwise it is in zone (assumption: out of zone data is filtered) --- diff --git a/zone.c b/zone.c index 0910dad0..77c39b4b 100644 --- a/zone.c +++ b/zone.c @@ -74,7 +74,7 @@ ldns_zone_strip_glue_rrs(const ldns_rdf *zone_name, const ldns_rr_list *rrs, ldn * above loop). * * Check if the aaaa/a list are subdomains under the - * NS domains or equal to the ns domains (and not at zone apex) + * NS domains. * If yes -> glue, if no -> not glue */ @@ -125,8 +125,7 @@ ldns_zone_strip_glue_rrs(const ldns_rdf *zone_name, const ldns_rr_list *rrs, ldn a = ldns_rr_list_rr(addr, j); dname_a = ldns_rr_owner(a); - if (ldns_dname_is_subdomain(dname_a, ns_owner) || - ldns_rdf_compare(dname_ns, dname_a) == 0) { + if (ldns_dname_is_subdomain(dname_a, ns_owner)) { /* GLUE! */ if (glue_rrs) { if (!ldns_rr_list_push_rr(glue_rrs, a)) goto memory_error; @@ -173,7 +172,8 @@ ldns_zone_glue_rr_list(const ldns_zone *z) * above loop). * * Check if the aaaa/a list are subdomains under the - * NS domains. If yes -> glue, if no -> not glue + * NS domains. + * If yes -> glue, if no -> not glue */ ldns_rr_list *zone_cuts; @@ -229,9 +229,8 @@ ldns_zone_glue_rr_list(const ldns_zone *z) for(j = 0; j < ldns_rr_list_rr_count(addr); j++) { a = ldns_rr_list_rr(addr, j); dname_a = ldns_rr_owner(a); - - if (ldns_dname_is_subdomain(dname_a, ns_owner) || - ldns_rdf_compare(dname_ns, dname_a) == 0) { + + if (ldns_dname_is_subdomain(dname_a, ns_owner)) { /* GLUE! */ if (!ldns_rr_list_push_rr(glue, a)) goto memory_error; }