Skip to content

Commit

Permalink
Pull request: home: fix adding client
Browse files Browse the repository at this point in the history
Merge in DNS/adguard-home from fix-arp-names to master

Updates #3597.

Squashed commit of the following:

commit b4737a3
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Tue Mar 22 16:55:52 2022 +0300

    home: fix adding client
  • Loading branch information
EugeneOne1 committed Mar 22, 2022
1 parent f8e45c1 commit b16b1d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/home/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ func (clients *clientsContainer) addHostLocked(ip net.IP, host string, src clien
return false
}

rc.Host = host
rc.Source = src
} else {
rc = &RuntimeClient{
Expand Down Expand Up @@ -829,7 +830,7 @@ func (clients *clientsContainer) addFromSystemARP() {

added := 0
for _, n := range ns {
if clients.addHostLocked(n.IP, "", ClientSourceARP) {
if clients.addHostLocked(n.IP, n.Name, ClientSourceARP) {
added++
}
}
Expand Down

0 comments on commit b16b1d1

Please sign in to comment.