mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-23 01:27:13 +02:00
internal/clientinfo: map ::1 to the right host MAC address
So queries originating from host using ::1 as source will be recognized properly, and treated the same as other queries from host itself.
This commit is contained in:
@@ -95,7 +95,7 @@ func (hf *hostsFile) LookupHostnameByIP(ip string) string {
|
||||
hf.mu.Lock()
|
||||
defer hf.mu.Unlock()
|
||||
if names := hf.m[ip]; len(names) > 0 {
|
||||
isLoopback := ip == "127.0.0.1" || ip == "::1"
|
||||
isLoopback := ip == ipV4Loopback || ip == ipv6Loopback
|
||||
for _, hostname := range names {
|
||||
name := normalizeHostname(hostname)
|
||||
// Ignoring ipv4/ipv6 loopback entry.
|
||||
|
||||
Reference in New Issue
Block a user