Skip to content

Commit 807632d

Browse files
author
Juha Heiskanen
committed
DHCP server freed next free allocated id
This fix a bug when 1 freed id is re-allocated and it set next free id to point already active ones. Change-Id: Ia3ab76f1800cbee41f8b82aea3fc7f455132c6dc
1 parent fd6ce04 commit 807632d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/libDHCPv6/libDHCPv6_server.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ static uint16_t libdhcpv6_get_next_freed_id(dhcpv6_gua_server_entry_s *serverInf
7575
if ((cur->allocatedID - last_allocated_id) == 2) {
7676
//one missing sequence between last and current
7777
if (last_allocated_id + 1 == serverInfo->firstFreedId) {
78-
//Skip
78+
//Skip Current freedID this will update after this call to new one
79+
last_allocated_id = cur->allocatedID;
7980
continue;
8081
}
8182
} else if (last_allocated_id + 1 == serverInfo->firstFreedId) {

0 commit comments

Comments
 (0)