Skip to content

Reuse server DHCPOFFER transaction id in DHCPREQUEST #1061

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simonborje
Copy link
Contributor

Hello! From my understanding of the DHCP specification rfc2131 smoltcp currently does not follow the specification when it comes to the transaction id used for DHCPREQUEST messages. I initially saw this mentioned in a discussion here esp-rs/esp-hal#2345 (reply in thread).

If I understand the spec. correctly, when a DHCPOFFER is received from a server, the follow-up DHCPREQUEST should reuse the transaction id from the DHCPOFFER message. Currently a new random transaction idis used for the request instead.

The relevant parts of the RFC is Table 5 and the text just after it (page 36-37).

I have only been able to test this on my home setup so far but it seems to work as expected there at least. I'm not sure how to add a proper test for this or if the change might interact with retries in some way that needs additional handling.

Copy link

codecov bot commented May 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.17%. Comparing base (e2b75e3) to head (2a3aff9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1061   +/-   ##
=======================================
  Coverage   81.17%   81.17%           
=======================================
  Files          81       81           
  Lines       28955    28957    +2     
=======================================
+ Hits        23503    23505    +2     
  Misses       5452     5452           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant