-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Hostnames for DHCP static leases are not retrieved #3166
Comments
I don't think this is the right way to resolve this. When you add a static lease you're supposed to supply a hostname as well. The hostname that the device sends in the DHCP request will be ignored in this case. |
The same issue after update to new version of AdGuardHome. |
That sounds ridiculous. How am I supposed to know what the hostname is? I don't want to put a fancy custom hostname if that's what you mean. At best, this should be auto-generated. |
|
Sorry, I will clarify that when I meant "auto-generated", I referred to the automated ARP scan just like for every DHCP device. That should be used when the device does not have a host name. E.g. Pixel phones. |
ARP scan makes little sense for a DHCP server, we're receiving the hostname in a DHCP request anyway. @ainar-g what do you think? |
@ameshkov, @EugeneOne1, we should already get the hostname if it's not taken, so I'm not really sure what is happening here. @agneevX, could you please collect verbose logs after restarting AGH and post them here or to our email? Thanks! |
I've sent an email with the logs! |
Sorry to interrupt but is there an update available here? I've found that adding a DHCP client to a static lease instantly invalidates the hostname. |
This issue is next in the queue, but I can't give you all any precise ETAs, sorry. |
@agneevX, unfortunatelly, we can't reproduce the issue. Could you please provide some details:
Additionally, you could try the latest |
Not sure what you mean. Static leases were added via the UI with the hostname field being blank. Note that the device was not connected via DHCP when it was added. Also AGH has been restarted since, which means that the hostname field was automatically populated with
No they do not. They all have the
Try this: Scenario 1:
Scenario 2: Hostname disappears when static lease is set
These could be related or you could open an issue for this one. |
Updates #3166. Squashed commit of the following: commit cac62f8 Author: Ildar Kamalov <ik@adguard.com> Date: Thu Jun 10 14:35:40 2021 +0300 client: get dhcp status on static lease submit commit 2ae4e3a Merge: 1e0f9c1 299ea88 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Jun 10 14:09:05 2021 +0300 Merge branch 'master' into 3166-fix-dhcp commit 1e0f9c1 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Jun 10 14:03:58 2021 +0300 dhcpd: imp code commit e4b9626 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Jun 10 13:03:47 2021 +0300 dhcpd: fix static lease load commit dc449f2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jun 1 17:21:10 2021 +0300 home: change clients sources priority
@agneevX, thanks for your detailed report. We've just published the new Could you please check if it fixes the issue for you? |
I'm sorry but this is not the way this feature generally works. A static lease is simply a static lease. If a user chooses to specify a custom hostname, that should be honored. However, if the hostname is left empty, and AGH is able to retrieve the hostname, it should use it rather than discard it, which serves no purpose at all. I'm very curious as to why this is. Also, am I correct in assuming that static leased clients that have an empty hostname field do not have a hostname at all?
I'm sorry, but my environment does not allow me to test beta builds, especially since I've run into major issues with stable builds. |
The way it currently works is that if you add a static lease, you also decide its hostname, including having the ability to leave it empty. We try to not modify static leases in any way. Perhaps we could a separate setting that would mean “this is a static lease, but accept any hostname that the client will send”, but even that would significantly complicate an already complicated logic. We will probably be able to properly return to this only in the v0.108.0 cycle.
I see. Hopefully, v0.107.0 will be an exception. We'll close this issue for now. Apologies for any inconveniences. |
Updates AdguardTeam#3166. Squashed commit of the following: commit cac62f8 Author: Ildar Kamalov <ik@adguard.com> Date: Thu Jun 10 14:35:40 2021 +0300 client: get dhcp status on static lease submit commit 2ae4e3a Merge: 1e0f9c1 299ea88 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Jun 10 14:09:05 2021 +0300 Merge branch 'master' into 3166-fix-dhcp commit 1e0f9c1 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Jun 10 14:03:58 2021 +0300 dhcpd: imp code commit e4b9626 Author: Eugene Burkov <e.burkov@adguard.com> Date: Thu Jun 10 13:03:47 2021 +0300 dhcpd: fix static lease load commit dc449f2 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Jun 1 17:21:10 2021 +0300 home: change clients sources priority
Prerequisites
Issue Details
Expected Behavior
Hostnames should be retrieved for DHCP leased devices, just like the behavior with any other DHCP-connected, non-leased device.
Actual Behavior
It seems that the "filler hostname" feature that was introduced in v0.106.0 sets a hostname for clients which are added via DHCP leases, instead of actually querying with ARP.
Screenshots
Additional Information
The text was updated successfully, but these errors were encountered: