diff --git a/dns/util.go b/dns/util.go index de0f65e2..67070630 100644 --- a/dns/util.go +++ b/dns/util.go @@ -96,6 +96,9 @@ func setMsgTTL(msg *D.Msg, ttl uint32) { } for _, extra := range msg.Extra { + if extra.Header().Rrtype == D.TypeOPT { // TTL section in OPT is the extended RCODE and flags (RFC 6891), not real TTL value + continue + } extra.Header().Ttl = ttl } }