Skip to content

Commit 5d321a8

Browse files
committed
Fix AP DHCPS not properly working on recent IDF
1 parent e8bb0db commit 5d321a8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

Diff for: libraries/WiFi/src/WiFiGeneric.cpp

+11-10
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,17 @@ esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=IPA
188188
lease.start_ip.addr = _byte_swap32(lease.start_ip.addr);
189189
lease.end_ip.addr = _byte_swap32(lease.end_ip.addr);
190190
log_v("DHCP Server Range: %s to %s", IPAddress(lease.start_ip.addr).toString().c_str(), IPAddress(lease.end_ip.addr).toString().c_str());
191-
err = esp_netif_dhcps_option(
192-
esp_netif,
193-
ESP_NETIF_OP_SET,
194-
ESP_NETIF_SUBNET_MASK,
195-
(void*)&info.netmask.addr, sizeof(info.netmask.addr)
196-
);
197-
if(err){
198-
log_e("DHCPS Set Netmask Failed! 0x%04x", err);
199-
return err;
200-
}
191+
// Following block is commented because it breaks AP DHCPS on recent ESP-IDF
192+
// err = esp_netif_dhcps_option(
193+
// esp_netif,
194+
// ESP_NETIF_OP_SET,
195+
// ESP_NETIF_SUBNET_MASK,
196+
// (void*)&info.netmask.addr, sizeof(info.netmask.addr)
197+
// );
198+
// if(err){
199+
// log_e("DHCPS Set Netmask Failed! 0x%04x", err);
200+
// return err;
201+
// }
201202
err = esp_netif_dhcps_option(
202203
esp_netif,
203204
ESP_NETIF_OP_SET,

0 commit comments

Comments
 (0)