mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-30 12:05:38 +00:00
Fix crash
This commit is contained in:
@@ -110,6 +110,13 @@ func Unmarshal(msg *dns.Msg, resp *Response, udpSize uint16, ednsClientNetmask u
|
||||
}
|
||||
}
|
||||
if ednsClientAddress != nil {
|
||||
if ednsClientNetmask == 255 {
|
||||
if ednsClientFamily == 1 {
|
||||
ednsClientNetmask = 24
|
||||
} else {
|
||||
ednsClientNetmask = 48
|
||||
}
|
||||
}
|
||||
edns0Subnet := new(dns.EDNS0_SUBNET)
|
||||
edns0Subnet.Code = dns.EDNS0SUBNET
|
||||
edns0Subnet.Family = ednsClientFamily
|
||||
|
||||
Reference in New Issue
Block a user