Use separate DNSRequestContext struct for adding DNS context to connections

This commit is contained in:
Daniel
2021-10-19 10:25:49 +02:00
parent 49767d4c4a
commit b9b33ed2b3
6 changed files with 59 additions and 42 deletions

View File

@@ -263,10 +263,10 @@ func UpdateIPsAndCNAMEs(q *resolver.Query, rrCache *resolver.RRCache, conn *netw
// Create new record for this IP.
record := resolver.ResolvedDomain{
Domain: q.FQDN,
RRCache: rrCache,
Resolver: rrCache.Resolver,
Expires: rrCache.Expires,
Domain: q.FQDN,
Resolver: rrCache.Resolver,
DNSRequestContext: rrCache.ToDNSRequestContext(),
Expires: rrCache.Expires,
}
// Resolve all CNAMEs in the correct order and add the to the record.