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
DHCP lease changes have no visual indication of whether they've been applied/saved or not. #2276
Comments
Ok, the above may not be completely correct. I have no dynamic leases for my device, a manually configured static lease, and it's still being given the old IP.
|
Ok, I'm an idiot. You have to hit save after adding static leases. On the other hand, there is zero indication of this, other then scrolling to the bottom of the page, and noticing there's a random "Save" button. This is despite any changes persisting to the server (adding static leases causes the page to do a full reload!). There really should be some sort of visual indicator that you have un-saved changes. |
I can't confirm this behavior. I don't have current active leases, but it uses the same code as the static leases, so I expect it give the same results. https://github.com/pi-hole/AdminLTE/blob/1714b082c3a233ea3a0c344b50352c59818676fc/settings.php#L634 |
No it doesn't do this by it's own. We have a button for this. PR #1634 |
Aaaand it seems to work fine. Man I must have been having a bad evening or something.
I know about the button, but I'm struggling to come up with a context where you want a existing dynamic lease to persist when adding a manual lease. Maybe I'm bringing expectations, but OPNSense/PFSense the static leases take priority. |
One could think about automatically delete current lease if a users adds a static lease for the same device. |
Yep, basically that seems to be how at least OPNSense works. |
This issue has been mentioned on Pi-hole Userspace. There might be relevant details there: |
As this turned out to be a feature request I added one to our discourse forum (where all feature requests should go) and close this issue here. |
Versions
Platform
Expected behavior
When you add a static DHCP lease, and then reboot the device that the lease specifies the IP for, I'd expect the device to use the newly configured address.
Actual behavior / bug
Adding a new DHCP static lease has lower priority then any active dynamic leases, and the process of adding a static lease does not clear any dynamic lease for the device's MAC. As such, the device will continue to pull the dynamic lease's specified IP until that lease expires. You have to manually delete the lease to make the device pull the correct IP (or, well, wait 24 hours).
Steps to reproduce
Steps to reproduce the behavior:
Debug Token
Screenshots
N/A
Additional context
Slightly off topic, but the sorting of IP addresses on the DHCP page is also incorrect. It currently sorts using pure alphanumeric ordering, which means you get
At least the IP addresses should be sorted numerically, rather then alphanumerically.
The text was updated successfully, but these errors were encountered: