it works!

This commit is contained in:
Simone Margaritelli 2024-09-19 16:33:44 +02:00
commit 91d360327a
12 changed files with 446 additions and 1356 deletions

View file

@ -75,14 +75,14 @@ func (lan *LAN) GetByIp(ip string) *Endpoint {
lan.Lock()
defer lan.Unlock()
if ip == lan.iface.IpAddress {
if ip == lan.iface.IpAddress || ip == lan.iface.Ip6Address {
return lan.iface
} else if ip == lan.gateway.IpAddress {
} else if ip == lan.gateway.IpAddress || ip == lan.gateway.Ip6Address {
return lan.gateway
}
for _, e := range lan.hosts {
if e.IpAddress == ip {
if e.IpAddress == ip || e.Ip6Address == ip {
return e
}
}