mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-04 18:03:20 +03:00
Allow to disable DHCP gateway offer when set up of AP. (#4421)
This commit is contained in:
parent
02f54e85fd
commit
071eeb8b67
@ -192,7 +192,7 @@ bool ESP8266WiFiAPClass::softAP(const String& ssid, const String& passphrase, in
|
||||
/**
|
||||
* Configure access point
|
||||
* @param local_ip access point IP
|
||||
* @param gateway gateway IP
|
||||
* @param gateway gateway IP (0.0.0.0 to disable)
|
||||
* @param subnet subnet mask
|
||||
*/
|
||||
bool ESP8266WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet) {
|
||||
@ -248,7 +248,7 @@ bool ESP8266WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPA
|
||||
ret = false;
|
||||
}
|
||||
|
||||
uint8 mode = 1;
|
||||
uint8 mode = info.gw.addr ? 1 : 0;
|
||||
if(!wifi_softap_set_dhcps_offer_option(OFFER_ROUTER, &mode)) {
|
||||
DEBUG_WIFI("[APConfig] wifi_softap_set_dhcps_offer_option failed!\n");
|
||||
ret = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user