Skip to content

Commit 726496c

Browse files
committed
Fix AP DHCPS not properly working on recent IDF
1 parent cb381f2 commit 726496c

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

libraries/WiFi/src/WiFiGeneric.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,17 @@ esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=IPA
192192
lease.start_ip.addr = _byte_swap32(lease.start_ip.addr);
193193
lease.end_ip.addr = _byte_swap32(lease.end_ip.addr);
194194
log_v("DHCP Server Range: %s to %s", IPAddress(lease.start_ip.addr).toString().c_str(), IPAddress(lease.end_ip.addr).toString().c_str());
195-
err = esp_netif_dhcps_option(
196-
esp_netif,
197-
ESP_NETIF_OP_SET,
198-
ESP_NETIF_SUBNET_MASK,
199-
(void*)&info.netmask.addr, sizeof(info.netmask.addr)
200-
);
201-
if(err){
202-
log_e("DHCPS Set Netmask Failed! 0x%04x", err);
203-
return err;
204-
}
195+
// Following block is commented because it breaks AP DHCPS on recent ESP-IDF
196+
// err = esp_netif_dhcps_option(
197+
// esp_netif,
198+
// ESP_NETIF_OP_SET,
199+
// ESP_NETIF_SUBNET_MASK,
200+
// (void*)&info.netmask.addr, sizeof(info.netmask.addr)
201+
// );
202+
// if(err){
203+
// log_e("DHCPS Set Netmask Failed! 0x%04x", err);
204+
// return err;
205+
// }
205206
err = esp_netif_dhcps_option(
206207
esp_netif,
207208
ESP_NETIF_OP_SET,

0 commit comments

Comments
 (0)