mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
dns: just return the request packet back when dnsnoaaaa
enabled
This commit is contained in:
parent
773d5d3b9d
commit
d3fbef02bb
@ -67,8 +67,9 @@ func (c *Client) Exchange(reqBytes []byte, clientAddr string, preferTCP bool) ([
|
|||||||
}
|
}
|
||||||
|
|
||||||
if c.config.NoAAAA && req.Question.QTYPE == QTypeAAAA {
|
if c.config.NoAAAA && req.Question.QTYPE == QTypeAAAA {
|
||||||
req.SetMsgType(ResponseMsg)
|
respBytes := valCopy(reqBytes)
|
||||||
return req.Marshal()
|
respBytes[2] |= uint8(ResponseMsg) << 7
|
||||||
|
return respBytes, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Question.QTYPE == QTypeA || req.Question.QTYPE == QTypeAAAA {
|
if req.Question.QTYPE == QTypeA || req.Question.QTYPE == QTypeAAAA {
|
||||||
|
Loading…
Reference in New Issue
Block a user