Skip to content

Conversation

earlephilhower
Copy link
Owner

When a link comes up, we were only sending a DHCP request if the existing netif's ipaddress was 0. When a DHCP lease is acquired at first that IP is changed to the given address, and if we do another ::begin we wouldn't dhcp_start to send a new request and use the old one (until its lease expired).

In the case of network changing (i.e. WiFiMulti on different nets or moving an Ethernet cable to another router) that old address would not be valid.

Track if an IP address has been manually set and use that to determine if DHCP needs to be re-requested instead of looking at the old netif's ipaddress.

Fixes #2974

When a link comes up, we were only sending a DHCP request if the existing
netif's ipaddress was 0.  When a DHCP lease is acquired at first that IP
is changed to the given address, and if we do another ::begin we wouldn't
dhcp_start to send a new request and use the old one (until its lease
expired).

In the case of network changing (i.e. WiFiMulti on different nets or
moving an Ethernet cable to another router) that old address would not
be valid.

Track if an IP address has been manually set and use that to determine
if DHCP needs to be re-requested instead of looking at the old netif's
ipaddress.

Fixes #2974
@earlephilhower earlephilhower merged commit 73bd6a0 into master May 31, 2025
26 checks passed
@earlephilhower earlephilhower deleted the dozo branch May 31, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WiFi issue !
1 participant