mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
OPT records don't have any class
This commit is contained in:
parent
02888adff3
commit
cc327fdc48
1 changed files with 2 additions and 2 deletions
|
@ -119,7 +119,7 @@ func setMaxTTL(msg *dns.Msg, ttl uint32) {
|
|||
}
|
||||
for _, rr := range msg.Extra {
|
||||
header := rr.Header()
|
||||
if header.Class == dns.ClassINET && header.Rrtype == dns.TypeOPT {
|
||||
if header.Rrtype == dns.TypeOPT {
|
||||
continue
|
||||
}
|
||||
if ttl < rr.Header().Ttl {
|
||||
|
@ -139,7 +139,7 @@ func updateTTL(msg *dns.Msg, expiration time.Time) {
|
|||
}
|
||||
for _, rr := range msg.Extra {
|
||||
header := rr.Header()
|
||||
if header.Class == dns.ClassINET && header.Rrtype == dns.TypeOPT {
|
||||
if header.Rrtype == dns.TypeOPT {
|
||||
continue
|
||||
}
|
||||
rr.Header().Ttl = ttl
|
||||
|
|
Loading…
Add table
Reference in a new issue