mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-11-04 10:47:47 +00:00
Fix ECS serialization
This commit is contained in:
1 parent
8f9d5dbdbe
commit
8cede6e423
1 file changed
+1
-1
+1
-1
@@ -82,7 +82,7 @@ func Marshal(msg *dns.Msg) *Response {
|
||||
if clientAddress == nil {
|
||||
clientAddress = net.IPv4(0, 0, 0, 0)
|
||||
}
|
||||
scopeMask := net.CIDRMask(int(edns0.SourceScope), len(clientAddress))
|
||||
scopeMask := net.CIDRMask(int(edns0.SourceScope), len(clientAddress) * 8)
|
||||
resp.EdnsClientSubnet = clientAddress.Mask(scopeMask).String() + "/" + strconv.Itoa(int(edns0.SourceScope))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user