-
Notifications
You must be signed in to change notification settings - Fork 433
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
DHCP refactor #459
DHCP refactor #459
Conversation
b33541f
to
b2e5d2c
Compare
This makes UdpRepr work like IpRepr, where it only emits the header, and the user must emit the payload. This makes it easier to emit UDP packets with payloads that come from protocol-specific reprs, like DHCP and in the future DNS.
21ca7eb
to
5dff97a
Compare
Marking as draft until I remove the "fast renew" hack commit |
tp-link routers pad the DNS server list with 0.0.0.0 to a fixed size :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all looking much nicer - thanks for putting in the work to get this refactored.
I'm going to test integrating this into our hardware platform and verify that things function as intended shortly, and will let you know how things go. Other feedback is attached in-line below - most is general questions on design decisions. I don't believe I found anything problematic during review.
Follow-up, I have now tested this on I also want to note that the buffer removal is also quite significant and this refactor makes DHCP much easier to use. Thanks for the hard work here! |
@Dirbaio Ping on this - is there any chance we can work towards getting this merged? This is a very nice improvement to DHCP. |
@ryan-summers Thank you for the review! and sorry for the delay, I've had a really bad month. Addressed all the comments, could you take another look? |
No worries! I appreciate the great work on the refactor. I believe there's only one discussion still in place (re: DHCP source/dest ports), but other than that, the changes look good |
Changed the port check to a hard assert, I believe this should be now good to go. ... except the CI now fails due to a defmt semver-breaking change :( knurling-rs/defmt#494 |
(expires_at-now)/2
before next retry.Tested against these DHCP servers:
Testing on more routers would be highly appreciated, especially crappy ISP routers. It requires a linux machine with wired Ethernet connection, and only 5 minutes of your time! Instructions here