Pull request: all: allow local non-top-level domains
Updates #2961. Squashed commit of the following: commit 207eeb85caf6caee81a669302daf4e10a5b61585 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Apr 15 18:48:50 2021 +0300 all: allow local non-top-level domains
This commit is contained in:
@@ -237,7 +237,7 @@ func (clients *clientsContainer) handleFindClient(w http.ResponseWriter, r *http
|
||||
var cj clientJSON
|
||||
if !ok {
|
||||
var found bool
|
||||
cj, found = clients.findTemporary(ip, idStr)
|
||||
cj, found = clients.findRuntime(ip, idStr)
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
@@ -258,9 +258,9 @@ func (clients *clientsContainer) handleFindClient(w http.ResponseWriter, r *http
|
||||
}
|
||||
}
|
||||
|
||||
// findTemporary looks up the IP in temporary storages, like autohosts or
|
||||
// blocklists.
|
||||
func (clients *clientsContainer) findTemporary(ip net.IP, idStr string) (cj clientJSON, found bool) {
|
||||
// findRuntime looks up the IP in runtime and temporary storages, like
|
||||
// /etc/hosts tables, DHCP leases, or blocklists.
|
||||
func (clients *clientsContainer) findRuntime(ip net.IP, idStr string) (cj clientJSON, found bool) {
|
||||
if ip == nil {
|
||||
return cj, false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user