fix: skip TTL update for OPT records

This commit is contained in:
wwqgtxx committed 2026-05-09 22:14:25 +08:00
1 parent 95946a5fb2
commit cc376acc5b
1 file changed
+3
+3
View File
@@ -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
}
}