Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: response AAAA records in TypeA query #1235

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/dns/nameserver_doh.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ func (s *DoHNameServer) findIPsForDomain(domain string, option dns_feature.IPOpt
var ips []net.Address
var ip6 []net.Address

switch {
case option.IPv4Enable:
if option.IPv4Enable {
ips, err4 = record.A.getIPs()
fallthrough
case option.IPv6Enable:
}

if option.IPv6Enable {
ip6, err6 = record.AAAA.getIPs()
ips = append(ips, ip6...)
}
Expand Down
8 changes: 4 additions & 4 deletions app/dns/nameserver_quic.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ func (s *QUICNameServer) findIPsForDomain(domain string, option dns_feature.IPOp
var ips []net.Address
var ip6 []net.Address

switch {
case option.IPv4Enable:
if option.IPv4Enable {
ips, err4 = record.A.getIPs()
fallthrough
case option.IPv6Enable:
}

if option.IPv6Enable {
ip6, err6 = record.AAAA.getIPs()
ips = append(ips, ip6...)
}
Expand Down
8 changes: 4 additions & 4 deletions app/dns/nameserver_tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ func (s *TCPNameServer) findIPsForDomain(domain string, option dns_feature.IPOpt
var ips []net.Address
var ip6 []net.Address

switch {
case option.IPv4Enable:
if option.IPv4Enable {
ips, err4 = record.A.getIPs()
fallthrough
case option.IPv6Enable:
}

if option.IPv6Enable {
ip6, err6 = record.AAAA.getIPs()
ips = append(ips, ip6...)
}
Expand Down
8 changes: 4 additions & 4 deletions app/dns/nameserver_udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ func (s *ClassicNameServer) findIPsForDomain(domain string, option dns_feature.I
var ips []net.Address
var ip6 []net.Address

switch {
case option.IPv4Enable:
if option.IPv4Enable {
ips, err4 = record.A.getIPs()
fallthrough
case option.IPv6Enable:
}

if option.IPv6Enable {
ip6, err6 = record.AAAA.getIPs()
ips = append(ips, ip6...)
}
Expand Down