Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: DHCPv4 server improvements #1500

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Feb 14, 2024

Jira: NCSDK-25558
Jira: NCSDK-25559

Not only check if the address pool belongs to the same subnet as the
server, but also that it does not overlap with the server address -
otherwise the server might end up assigning its own address.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit a147ac9)
…addresses

DHCPv4 server will send an ICMP probe (echo request) for the requested
address before replying with DHCP Offer, unless probing is disabled in
Kconfig.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 3c76ff9)
Upstream PR: zephyrproject-rtos/zephyr#68848

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: Robert Lubos <[email protected]>
…ions

Upstream PR: zephyrproject-rtos/zephyr#68848

Apply ranges to DHCPv4 server timeout Kconfig options, so that it cannot
be set to a negative value by mistake.

Signed-off-by: Robert Lubos <[email protected]>
@rlubos rlubos merged commit 352bf88 into nrfconnect:main Feb 15, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants