Skip to content

Commit 7da221d

Browse files
Merge branch 'master' into newgcc
2 parents fdbafe8 + 948e9bf commit 7da221d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/lwIP_Ethernet/src/LwipIntfDev.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,10 @@ bool LwipIntfDev<RawDev>::begin(const uint8_t* macAddress, const uint16_t mtu) {
393393
}
394394

395395
if (_isDHCP) {
396-
// IP not set, starting DHCP
396+
// Destroy any existing address
397+
ip4_addr_set_u32(ip_2_ip4(&_netif.ip_addr), 0);
398+
399+
// Start a new DHCP request
397400
_netif.flags |= NETIF_FLAG_UP;
398401
switch (dhcp_start(&_netif)) {
399402
case ERR_OK:

0 commit comments

Comments
 (0)