mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 05:34:32 +02:00
lwip: Fix DHCP Server to remove clients record if request not acked
When client's request refused by sending NAK, its record still resided in the linked list of pooled addresses. It is okay from the spec perspective (RFC2131.p16: Server MAY mark the offered address unavailable), but would consume some memory if the client didn't retry. Closes https://github.com/espressif/esp-idf/issues/6410
This commit is contained in:
@@ -916,7 +916,7 @@ POOL_CHECK:
|
||||
|
||||
s16_t ret = parse_options(&m->options[4], len);;
|
||||
|
||||
if (ret == DHCPS_STATE_RELEASE) {
|
||||
if (ret == DHCPS_STATE_RELEASE || ret == DHCPS_STATE_NAK) {
|
||||
if (pnode != NULL) {
|
||||
node_remove_from_list(&plist, pnode);
|
||||
free(pnode);
|
||||
|
Reference in New Issue
Block a user