Skip to content

Commit

Permalink
fix: per RFC 4501 correct dnsquery
Browse files Browse the repository at this point in the history
  • Loading branch information
NGTmeaty authored and CorentinB committed Sep 27, 2024
1 parent a075225 commit 3fd3d8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ func (d *customDialer) lookupIP(address string, recordType uint16) (net.IP, erro
}

// Record the DNS response
recordTypeStr := "A"
recordTypeStr := "TYPE=A"
if recordType == dns.TypeAAAA {
recordTypeStr = "AAAA"
recordTypeStr = "TYPE=AAAA"
}

d.client.WriteRecord(fmt.Sprintf("dns:%s?%s", address, recordTypeStr), "resource", "text/dns", r.String())
Expand Down

0 comments on commit 3fd3d8d

Please sign in to comment.