cherry-pick: 3142 swap arp and rdns priority
Merge in DNS/adguard-home from 3142-fix-clients to master Updates #3142. Updates #3597. Squashed commit of the following: commit 4dcabedbfb1a4e4a0aaba588f708e4625442fce8 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Mar 22 15:13:15 2022 +0300 all: imp log of changes commit 481088d05eecac1109daf378e0b4d5f6b2cf099b Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Mar 22 14:36:44 2022 +0300 all: swap arp and rdns priority
This commit is contained in:
committed by
Ainar Garipov
parent
c4a13b92d2
commit
ba0cf5739b
@@ -56,8 +56,8 @@ type clientSource uint
|
||||
// Client sources. The order determines the priority.
|
||||
const (
|
||||
ClientSourceWHOIS clientSource = iota
|
||||
ClientSourceRDNS
|
||||
ClientSourceARP
|
||||
ClientSourceRDNS
|
||||
ClientSourceDHCP
|
||||
ClientSourceHostsFile
|
||||
)
|
||||
@@ -721,9 +721,7 @@ func (clients *clientsContainer) AddHost(ip net.IP, host string, src clientSourc
|
||||
clients.lock.Lock()
|
||||
defer clients.lock.Unlock()
|
||||
|
||||
ok = clients.addHostLocked(ip, host, src)
|
||||
|
||||
return ok, nil
|
||||
return clients.addHostLocked(ip, host, src), nil
|
||||
}
|
||||
|
||||
// addHostLocked adds a new IP-hostname pairing. For internal use only.
|
||||
|
||||
Reference in New Issue
Block a user