Skip to content

net: lib: dhcpv4: Support INIT-REBOOT #91902

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

Merged
merged 4 commits into from
Jun 25, 2025

Conversation

pdgendt
Copy link
Collaborator

@pdgendt pdgendt commented Jun 19, 2025

Add the init-reboot state for DHCPv4 to request an already assigned IP address.

@pdgendt pdgendt requested review from jukkar and rlubos June 19, 2025 09:31
@pdgendt pdgendt force-pushed the dhcp-init-reboot branch from 60a925b to 6f73884 Compare June 19, 2025 11:37
@pdgendt
Copy link
Collaborator Author

pdgendt commented Jun 19, 2025

@jukkar @rlubos I will try to add a testcase, but I wouldn't mind an initial look to see if I'm on the right track, thanks!

Copy link
Member

@jukkar jukkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to my eyes. I wonder if we are able to add some tests for this.

@pdgendt
Copy link
Collaborator Author

pdgendt commented Jun 23, 2025

Looks pretty good to my eyes. I wonder if we are able to add some tests for this.

Working on it ;)

Copy link
Collaborator

@rlubos rlubos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable

pdgendt added 2 commits June 23, 2025 13:54
When reading and printing hosname or domain name from DHCP options, we need
to skip the leftover bytes that do not fit into the provided buffers.

Signed-off-by: Pieter De Gendt <[email protected]>
Add the init-reboot state for DHCPv4 to request an already assigned IP
address.

Signed-off-by: Pieter De Gendt <[email protected]>
@pdgendt pdgendt force-pushed the dhcp-init-reboot branch from 6f73884 to 0df0e8e Compare June 23, 2025 11:54
@pdgendt pdgendt marked this pull request as ready for review June 23, 2025 11:57
@pdgendt pdgendt force-pushed the dhcp-init-reboot branch from 0df0e8e to c01a0de Compare June 23, 2025 12:00
rlubos
rlubos previously approved these changes Jun 23, 2025
Use k_event bit flags to test individual events and callbacks. Don't rely
on the number of events that happened.

Signed-off-by: Pieter De Gendt <[email protected]>
rlubos
rlubos previously approved these changes Jun 23, 2025
jukkar
jukkar previously approved these changes Jun 23, 2025
maass-hamburg
maass-hamburg previously approved these changes Jun 23, 2025
Add tests that verify the behavior of stopping and starting the DHCPv4
client.

Signed-off-by: Pieter De Gendt <[email protected]>
@pdgendt pdgendt dismissed stale reviews from maass-hamburg, jukkar, and rlubos via 6dda59e June 24, 2025 08:53
@pdgendt pdgendt force-pushed the dhcp-init-reboot branch from 86ae1b7 to 6dda59e Compare June 24, 2025 08:53
@pdgendt
Copy link
Collaborator Author

pdgendt commented Jun 24, 2025

Last push:

  • Converted goto jump with a simple for loop.

Copy link

@maass-hamburg maass-hamburg requested a review from jukkar June 24, 2025 09:22
@kartben kartben merged commit c906d4a into zephyrproject-rtos:main Jun 25, 2025
27 checks passed
@pdgendt pdgendt deleted the dhcp-init-reboot branch June 25, 2025 12:30
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