mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02:00
dhcp/dhcpserver Fix max station limit check in dhcp server
Currently when MAX_STATION limit in DHCP config is set to N, dhcp server issues only N-1 IP addresses. This is problematic from customer perspective if both SoftAP MAX_STATION and DHCP MAX_STATION limit is set to same value. With this change DHCP server can issue N addresses that is inline with the set limit. Closes TW<20556>
This commit is contained in:
@@ -1247,7 +1247,7 @@ void dhcps_coarse_tmr(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_dhcps_pool >= MAX_STATION_NUM) {
|
if (num_dhcps_pool > MAX_STATION_NUM) {
|
||||||
kill_oldest_dhcps_pool();
|
kill_oldest_dhcps_pool();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user