-
Notifications
You must be signed in to change notification settings - Fork 3
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
dhcrelay: PXE DHCP Offer Discarded with Invalid Size Error #2
Comments
The check was added in 2004 via openbsd/src@c3d07ec0a33a but it's not in ISC's dhcp that includes dhcrelay binaries. Also I don't see that dhclient ever (even dhcpleased for OpenBSD) checks the BOOTP_MIN_LEN to discard a received packet afterwards... We have two options here. Either we remove the check and hope integrity is adhered to within the bounds of the DHCP packet structure or we pad out the buffer like some ISC variants are doing, but that's more related to sending packets along. And then I found this equivalent: https://github.com/isc-projects/dhcp/blob/572032cb0e514606559de3784e3f7ca8e1539d17/common/discover.c#L1119-L1129 DHCP_FIXED_NON_UDP is 236 so it should do what we want... related to commit isc-projects/dhcp@8bd96ccb |
To be frank I'll just shortcut this into 24.7.1 and you let me know if it works. This just changes 300 into 236 all things considered. |
Updated and it works! Thanks @fichtner ! 🙌 |
Great, thanks for the report! 😊 |
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
I am attempting a DHCP Relay to our Microsoft SCCM PXE server. I see the device DHCP Discover relayed correctly but dhcrelay logs a
Discarding packet with invalid size.
error on its DHCP Offer. Wireshark shows the UDP payload = 292 bytes with Agent Information Option enabled and 280 bytes without it. From what I am able to determineBOOTP_MIN_LEN
is set to 300 bytes.Expected behavior
Expected dhcrelay to relay the PXE DHCP Offer packet.
Describe alternatives you considered
None found. I have no control over the server configuration.
Screenshots
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 24.7_9-amd64
Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (2 cores, 4 threads)
Intel igb network driver
The text was updated successfully, but these errors were encountered: