dns: set ttl to minttl config for custom dns recordings

This commit is contained in:
nadoo committed 2019-01-06 20:38:15 +08:00
1 parent 3c50c46eb9
commit c89d6018cf
9 files changed
+89 -83

No files matched your search

+1 -1
View File
@@ -277,7 +277,7 @@ func (c *Client) GenResponse(domain string, ip string) (*Message, error) {
m := NewMessage(0, Response)
m.SetQuestion(NewQuestion(qtype, domain))
rr := &RR{NAME: domain, TYPE: qtype, CLASS: ClassINET,
RDLENGTH: rdlen, RDATA: rdata}
TTL: uint32(c.config.MinTTL), RDLENGTH: rdlen, RDATA: rdata}
m.AddAnswer(rr)
return m, nil