Skip to content
Commit e28428ca authored by Robert Lubos's avatar Robert Lubos Committed by Fabio Baltieri
Browse files

net: dhcpv4_server: Improve declined addresses management



In case conflict is detected (either due to receiving Decline message or
due to ICMP probe getting reply), the conflicting address becomes
blocked for further use.

Although the RFC is not specific about how long should the address be
blocked, it make sense to implement some fallback mechanisms to reuse
blocked addresses in the server, otherwise, after longer period of
operation, it may run out of usable address.

This commit adds a timeout for declined addresses, so that by default
the address is marked back as "free" after 24 hrs (default lease time).
It also implements a mechanism, which allows to re-use the oldest
declined entry in case the server runs out of fresh addresses to assign.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 9e1eec9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment