Skip to content

Commit cc376ac

Browse files
committed
fix: skip TTL update for OPT records
1 parent 95946a5 commit cc376ac

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dns/util.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ func setMsgTTL(msg *D.Msg, ttl uint32) {
9696
}
9797

9898
for _, extra := range msg.Extra {
99+
if extra.Header().Rrtype == D.TypeOPT { // TTL section in OPT is the extended RCODE and flags (RFC 6891), not real TTL value
100+
continue
101+
}
99102
extra.Header().Ttl = ttl
100103
}
101104
}

0 commit comments

Comments
 (0)