mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-29 20:40:35 +00:00
Alias 0/0 to be 0.0.0.0/0
This commit is contained in:
@@ -129,13 +129,13 @@ func (s *Server) handlerFunc(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
ednsClientSubnet := r.FormValue("edns_client_subnet")
|
||||
if ednsClientSubnet == "0/0" {
|
||||
ednsClientSubnet = "0.0.0.0/0"
|
||||
}
|
||||
ednsClientFamily := uint16(0)
|
||||
ednsClientAddress := net.IP(nil)
|
||||
ednsClientNetmask := uint8(255)
|
||||
if ednsClientSubnet != "" {
|
||||
if ednsClientSubnet == "0/0" {
|
||||
ednsClientSubnet = "0.0.0.0/0"
|
||||
}
|
||||
slash := strings.IndexByte(ednsClientSubnet, '/')
|
||||
if slash < 0 {
|
||||
ednsClientAddress = net.ParseIP(ednsClientSubnet)
|
||||
|
||||
Reference in New Issue
Block a user