Skip to content
Snippets Groups Projects
Commit d09434bf authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Fixed searching for zone for name.

- If the found zone was last in canonical order and the QNAME
  was greater than the zone name, it returned the zone no matter
  if the QNAME belonged to the zone.
- Quick fix, would require more thorough testing and maybe complete
  change of the structure in which the zones are kept.
parent 824a781e
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,10 @@ DEBUG_DNSLIB_ZONEDB(
debug_ns("Found zone for name %s: %p\n", name, zone);
free(name);
);
if (dnslib_dname_compare(zone->apex->owner, dname) != 0
&& !dnslib_dname_is_subdomain(dname, zone->apex->owner)) {
zone = NULL;
}
rcu_read_unlock();
return zone;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment