Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the ARP scanning period #1398

Closed
adrianh-za opened this issue Feb 8, 2020 · 5 comments
Closed

Reduce the ARP scanning period #1398

adrianh-za opened this issue Feb 8, 2020 · 5 comments

Comments

@adrianh-za
Copy link

The current period to update clients is 1 hour. Can't we make is substantially less?

Or even better, make it configurable in the UI, or the YAML file if need be.

@ameshkov
Copy link
Member

ameshkov commented Feb 9, 2020

Mm, what period exactly do you mean? The application update check period?

@adrianh-za
Copy link
Author

adrianh-za commented Feb 9, 2020

The server runs a process to update client names (host file and arp) every hour. This interval is hardcoded in clients.go file.

As all of my connected devices explicitly use AGD as DNS server, sometimes the client list and query log only shows the IP address until such time the update has run.

Was thinking that the interval could be reduced. Or even better, allow the update interval to be configured by the end user.

https://github.com/AdguardTeam/AdGuardHome/blob/master/home/clients.go

line 23
const ( clientsUpdatePeriod = 1 * time.Hour )

line 188
func (clients *clientsContainer) periodicUpdate() { for { clients.addFromHostsFile() clients.addFromSystemARP() time.Sleep(clientsUpdatePeriod) } }

@ameshkov
Copy link
Member

Well, in theory, the first time we encounter an IP address, we should try resolving its hostname. If that does not happen for some of your clients, this is most likely a bug.

Just in case, do you use AGH as a DHCP server?

@adrianh-za
Copy link
Author

I don't use AGH as DHCP server.

Yeah, definitely not happening immediately for some of my clients. Check an hour later, and they are updated.

@ameshkov
Copy link
Member

Ah, wait, that's my bad. RDNS resolution happens in this manner, ARP is indeed once an hour

@ameshkov ameshkov changed the title Reduce client update period Reduce the ARP scanning period Feb 10, 2020
@ameshkov ameshkov added this to the v0.103 milestone Feb 28, 2020
@szolin szolin self-assigned this May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants