mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-12-12 01:36:39 +08:00
No port specified means to use a random port. udp_new_port() returns a new (free) local UDP port number on success. So in this case we don't need iterating all lists to test if the port number is used, udp_new_port() alreay ensures the port is not used. Move the code checking for double bind and rebind of the same pcb earlier, as this checking is necessary in all cases. Signed-off-by: Axel Lin <axel.lin@ingics.com>