mirror of
https://github.com/safing/portmaster
synced 2025-09-11 07:24:36 +00:00
Move some Resolver information to ResolverInfo and propagate it
This commit is contained in:
parent
43cfba8445
commit
20383226f8
13 changed files with 275 additions and 180 deletions
|
@ -72,22 +72,20 @@ func (pr *PlainResolver) Query(ctx context.Context, q *Query) (*RRCache, error)
|
|||
|
||||
// check if blocked
|
||||
if pr.resolver.IsBlockedUpstream(reply) {
|
||||
return nil, &BlockedUpstreamError{pr.resolver.GetName()}
|
||||
return nil, &BlockedUpstreamError{pr.resolver.Info.DescriptiveName()}
|
||||
}
|
||||
|
||||
// hint network environment at successful connection
|
||||
netenv.ReportSuccessfulConnection()
|
||||
|
||||
newRecord := &RRCache{
|
||||
Domain: q.FQDN,
|
||||
Question: q.QType,
|
||||
RCode: reply.Rcode,
|
||||
Answer: reply.Answer,
|
||||
Ns: reply.Ns,
|
||||
Extra: reply.Extra,
|
||||
Server: pr.resolver.Server,
|
||||
ServerScope: pr.resolver.ServerIPScope,
|
||||
ServerInfo: pr.resolver.ServerInfo,
|
||||
Domain: q.FQDN,
|
||||
Question: q.QType,
|
||||
RCode: reply.Rcode,
|
||||
Answer: reply.Answer,
|
||||
Ns: reply.Ns,
|
||||
Extra: reply.Extra,
|
||||
Resolver: pr.resolver.Info.Copy(),
|
||||
}
|
||||
|
||||
// TODO: check if reply.Answer is valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue