mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-10-12 02:08:11 +08:00
fix: skip TTL update for OPT records
This commit is contained in:
1 parent
95946a5fb2
commit
cc376acc5b
1 file changed
+3
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user