if we use a FIFO queue it'd be better for the edge case when allocations ran out as @LK4D4 mentioned:

e.g. consider a network of 255 addresses (ignoring broadcast and gateway), and the following call pattern:

RequestIP(returns: 1) -> RequestIP(returns: 2) -> ... ->RequestIP(returns: 255)

followed by

ReleaseIP(255) -> ReleaseIP(254) -> ... -> ReleaseIP(1)

followed by

RequestIP -> this will return 1, which was just released, if we use a sorted set. If we use an unsorted FIFO queue, it'll return 255, which was released earlier, further reducing the possibility of an ARP cache clashing.


Though in maybe 99% cases such allocation pattern would not occur (also considering by default we have a /16 (maybe larger? couldn't remember) network to work with)