mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-15 09:58:42 -07:00
client: client ipv6 zone
This commit is contained in:
parent
6f36ebc06c
commit
e9c1cbb85e
@ -192,6 +192,8 @@ func (ci *Index) Find(id string) (c *Persistent, ok bool) {
|
||||
|
||||
// find finds persistent client by IP address.
|
||||
func (ci *Index) findByIP(ip netip.Addr) (c *Persistent, found bool) {
|
||||
ip = ip.WithZone("")
|
||||
|
||||
uid, found := ci.ipToUID[ip]
|
||||
if found {
|
||||
return ci.uidToClient[uid], true
|
||||
|
@ -161,7 +161,7 @@ func (c *Persistent) setID(id string) (err error) {
|
||||
|
||||
var ip netip.Addr
|
||||
if ip, err = netip.ParseAddr(id); err == nil {
|
||||
c.IPs = append(c.IPs, ip)
|
||||
c.IPs = append(c.IPs, ip.WithZone(""))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user