mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
ipset: support ipv6
This commit is contained in:
1 parent
a919ac3469
commit
faae2a9e22
4 files changed
+27
-12
No files matched your search
+2
-2
@@ -67,7 +67,7 @@ func (c *Client) Exchange(reqBytes []byte, clientAddr string, preferTCP bool) ([
|
||||
}
|
||||
|
||||
if c.config.NoAAAA && req.Question.QTYPE == QTypeAAAA {
|
||||
reqBytes[2] |= uint8(Response) << 7
|
||||
reqBytes[2] |= uint8(ResponseMsg) << 7
|
||||
return reqBytes, nil
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ func MakeResponse(domain, ip string, ttl uint32) (*Message, error) {
|
||||
rdata = ipb
|
||||
}
|
||||
|
||||
m := NewMessage(0, Response)
|
||||
m := NewMessage(0, ResponseMsg)
|
||||
m.SetQuestion(NewQuestion(qtype, domain))
|
||||
rr := &RR{NAME: domain, TYPE: qtype, CLASS: ClassINET,
|
||||
TTL: ttl, RDLENGTH: rdlen, RDATA: rdata}
|
||||
|
||||
Reference in new issue
Block a user