mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
All Interfaces/0.0.0.0 prevents DHCP from being enabled on an interface due port binding 0.0.0.0:68 #594
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#594
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Mar 23, 2019).
Originally assigned to: @IldarKamalov, @szolin on GitHub.
This is when set up for 'All Interfaces' in the Wizard. When allowing AdGuard Home to be used for DHCP, it is impossible to enable it from the Web Interface, as it tells me that the port is already in use.
Couldn't listen to 192.168.0.2:68, cause: listen udp4 192.168.0.2:68: bind: address already in useThe port is in use by 0.0.0.0:68. Restarting AdGuard Home after configuring the DHCP still binds port 68 to 0.0.0.0 regardless of the interface selected.
It would be nice for the DHCP settings to determine where port 68 will be used, instead of following what the bind address is, since you already ask the user what interface you want the DHCP server to run on.
eg. If I select eth0 which shows me the IPv4 and IPv6 address, clicking on Save should unbind port 68 from 0.0.0.0 and bind it to the IPv4 address when enabled.
Steps to reproduce
Expected behavior
I can click 'Enable DHCP Server' and start the DHCP Server on 192.168.0.2:68
Actual behavior
The button is not enabled and the port is already used by 0.0.0.0:68 on itself.
Screenshot:
Your environment
@szolin commented on GitHub (Mar 26, 2019):
Currently UI automatically executes "Check for DHCP servers" command and doesn't allow to switch DHCP server on if something went wrong on server side.
And "Check for DHCP servers" command doesn't work reliably because it tries to bind on port 68 (which is by default opened by dhcpcd or dhclient daemons).
So we should rework the process of how we check for another DHCP server running on the system.
@planet0 As a work-around, you can manually edit yaml config file and set
enabled trueindhcpsection.@szolin commented on GitHub (Mar 28, 2019):
So the task is as follows:
If client's request is
POST /control/dhcp/find_active_dhcpand server responds with
{"error":...}allow the user to click on button "Enable DHCP Server".
And show this message:
Note: message "If you want to enable..." is changed a little bit.
Don't show the message "If you want to enable..." if server responds with {"found":false} to request "POST /control/dhcp/find_active_dhcp".
The message "Error details" may be expandable on-click.
@ameshkov commented on GitHub (Mar 29, 2019):
I just realized that this means that the port is occupied by the DHCP client, and we should not run DHCP server unless the DHCP client is stopped and IP is set to be static.
@szolin wouldn't it be better to automate it here?
@ameshkov commented on GitHub (Mar 29, 2019):
Merged into https://github.com/AdguardTeam/AdGuardHome/issues/686