cleanup fakedns package

This commit is contained in:
Jason
2019-08-16 13:13:15 +08:00
parent 760f1aaab1
commit b968f528d6
9 changed files with 12 additions and 11 deletions

View File

@@ -0,0 +1,19 @@
package fakedns
import (
D "github.com/miekg/dns"
)
func setMsgTTL(msg *D.Msg, ttl uint32) {
for _, answer := range msg.Answer {
answer.Header().Ttl = ttl
}
for _, ns := range msg.Ns {
ns.Header().Ttl = ttl
}
for _, extra := range msg.Extra {
extra.Header().Ttl = ttl
}
}