mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
dns: just return the request packet back when dnsnoaaaa enabled
This commit is contained in:
1 parent
773d5d3b9d
commit
d3fbef02bb
1 file changed
+3
-2
+3
-2
@@ -67,8 +67,9 @@ func (c *Client) Exchange(reqBytes []byte, clientAddr string, preferTCP bool) ([
|
||||
}
|
||||
|
||||
if c.config.NoAAAA && req.Question.QTYPE == QTypeAAAA {
|
||||
req.SetMsgType(ResponseMsg)
|
||||
return req.Marshal()
|
||||
respBytes := valCopy(reqBytes)
|
||||
respBytes[2] |= uint8(ResponseMsg) << 7
|
||||
return respBytes, nil
|
||||
}
|
||||
|
||||
if req.Question.QTYPE == QTypeA || req.Question.QTYPE == QTypeAAAA {
|
||||
|
||||
Reference in new issue
Block a user