mirror of
https://github.com/folbricht/routedns.git
synced 2025-12-21 09:29:56 -06:00
Copy queries prior to packing them in resolvers (#290)
* Copy queries prior to packing them in resolvers * Fix race in quic restart logic * Remove bad lock
This commit is contained in:
@@ -65,6 +65,9 @@ func NewDNSClient(id, endpoint, network string, opt DNSClientOptions) (*DNSClien
|
||||
|
||||
// Resolve a DNS query.
|
||||
func (d *DNSClient) Resolve(q *dns.Msg, ci ClientInfo) (*dns.Msg, error) {
|
||||
// Packing a message is not always a read-only operation, make a copy
|
||||
q = q.Copy()
|
||||
|
||||
logger(d.id, q, ci).WithFields(logrus.Fields{
|
||||
"resolver": d.endpoint,
|
||||
"protocol": d.net,
|
||||
|
||||
Reference in New Issue
Block a user