Change the ECS prefix length from /48 to /56 for IPv6, per RFC 7871

This commit is contained in:
Star Brilliant
2018-08-14 09:06:13 +08:00
parent f40116b1f8
commit ffe5573552
7 changed files with 11 additions and 11 deletions

View File

@@ -104,7 +104,7 @@ func (s *Server) parseRequestGoogle(w http.ResponseWriter, r *http.Request) *DNS
ednsClientNetmask = 24
} else {
ednsClientFamily = 2
ednsClientNetmask = 48
ednsClientNetmask = 56
}
} else {
ednsClientAddress = net.ParseIP(ednsClientSubnet[:slash])
@@ -139,7 +139,7 @@ func (s *Server) parseRequestGoogle(w http.ResponseWriter, r *http.Request) *DNS
ednsClientNetmask = 24
} else {
ednsClientFamily = 2
ednsClientNetmask = 48
ednsClientNetmask = 56
}
}

View File

@@ -126,7 +126,7 @@ func (s *Server) parseRequestIETF(w http.ResponseWriter, r *http.Request) *DNSRe
ednsClientNetmask = 24
} else {
ednsClientFamily = 2
ednsClientNetmask = 48
ednsClientNetmask = 56
}
edns0Subnet = new(dns.EDNS0_SUBNET)
edns0Subnet.Code = dns.EDNS0SUBNET