-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
A query to the server for a zone's own SOA record returns NXDOMAIN, when I would expect it to return the SOA record for the zone. This appears to happen because the SOA record is in the Zone's soa property, not an element of the Zone's records array, so a match is not found by lookup() in Utopia\DNS\Zone\Resolver.
A possible fix would be to add an explicit check for a query for the SOA record in Utopia\DNS\Zone\Resolver::lookup() after the check for zero queries, just before selecting the best matching records.
// Return the zone's SOA record
if (($question->type === Record::TYPE_SOA) && ($question->name === $zone->name) {
return Message::response(
header: $query->header,
responseCode: Message::RCODE_NOERROR,
questions: $query->questions,
answers: [$zone->soa],
authoritative: true,
recursionAvailable: false
);
}
Metadata
Metadata
Assignees
Labels
No labels