1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-03 06:30:42 +00:00

Fix: fix failure of cache expired DNS record querying over DoH (#1706)

This commit is contained in:
KujouRinka 2022-04-02 12:59:21 +08:00 committed by GitHub
parent 0bf1f2bae6
commit 2dc4ee2d51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,7 +297,7 @@ func (s *DoHNameServer) findIPsForDomain(domain string, option dns_feature.IPOpt
var ips []net.Address var ips []net.Address
var lastErr error var lastErr error
if option.IPv6Enable && record.AAAA != nil && record.AAAA.RCode == dnsmessage.RCodeSuccess { if option.IPv6Enable {
aaaa, err := record.AAAA.getIPs() aaaa, err := record.AAAA.getIPs()
if err != nil { if err != nil {
lastErr = err lastErr = err
@ -305,7 +305,7 @@ func (s *DoHNameServer) findIPsForDomain(domain string, option dns_feature.IPOpt
ips = append(ips, aaaa...) ips = append(ips, aaaa...)
} }
if option.IPv4Enable && record.A != nil && record.A.RCode == dnsmessage.RCodeSuccess { if option.IPv4Enable {
a, err := record.A.getIPs() a, err := record.A.getIPs()
if err != nil { if err != nil {
lastErr = err lastErr = err