- clients: fix incorrect info for clients from /etc/hosts
Close #1786 Squashed commit of the following: commit fc662252be38f20c9afda46fcb578efa50c9baf2 Author: Simon Zolin <s.zolin@adguard.com> Date: Thu Jun 11 10:57:26 2020 +0300 - clients: fix incorrect info for clients from /etc/hosts
This commit is contained in:
@@ -371,11 +371,11 @@ func (a *AutoHosts) ProcessReverse(addr string, qtype uint16) string {
|
||||
return host
|
||||
}
|
||||
|
||||
// List - get the hosts table. Thread-safe.
|
||||
func (a *AutoHosts) List() map[string][]net.IP {
|
||||
table := make(map[string][]net.IP)
|
||||
// List - get "IP -> hostname" table. Thread-safe.
|
||||
func (a *AutoHosts) List() map[string]string {
|
||||
table := make(map[string]string)
|
||||
a.lock.Lock()
|
||||
for k, v := range a.table {
|
||||
for k, v := range a.tableReverse {
|
||||
table[k] = v
|
||||
}
|
||||
a.lock.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user