Support microsoft-conform user class option in DHCPv6 - #559
Open
damyan wants to merge 3 commits into
Open
Conversation
damyan
force-pushed
the
fix/fix-non-rfc-conform-optusrclass-v6
branch
2 times, most recently
from
March 27, 2025 07:37
a882567 to
7980a6f
Compare
Collaborator
|
Related for DHCPv4: #114 |
damyan
force-pushed
the
fix/fix-non-rfc-conform-optusrclass-v6
branch
from
August 22, 2025 13:20
25d0e90 to
1159fb8
Compare
damyan
added a commit
to ironcore-dev/FeDHCP
that referenced
this pull request
Jan 19, 2026
Go for private vesions until insomniacslk/dhcp#559 is merged
Signed-off-by: Damyan Yordanov <damyan.yordanov@sap.com>
damyan
force-pushed
the
fix/fix-non-rfc-conform-optusrclass-v6
branch
from
March 20, 2026 11:00
06ef025 to
2f82482
Compare
Document the dual-parsing behavior in the FromBytes doc comment. Add a bufferTooShort flag so that a truncated length field returns `ErrBufferTooShort` for RFC-compliant payloads. Signed-off-by: Damyan Yordanov <damyan.yordanov@sap.com>
Author
|
Rebased the branch and implemented the review findings. |
Do not reinterpret corrupt data (first buffer exceeds the buffer) as MS format Catch trailing bytes in the normal RFC 8415 case Add a test for buffer too short Signed-off-by: Damyan Yordanov <damyan.yordanov@sap.com>
damyan
force-pushed
the
fix/fix-non-rfc-conform-optusrclass-v6
branch
from
March 23, 2026 13:40
34add2e to
974dd10
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses an issue in the DHCPv6 User Class option (
OptUserClass) where theFromBytesmethod failed to parse data in the Microsoft-compatible format. The existing implementation adhered strictly to the RFC 8415 specification, which requires each user class to be preceded by a 16-bit length field. However, Microsoft DHCPv6 implementations deviate from this by providing a single user class as raw bytes without a length prefix. This mismatch caused a "buffer too short" error when parsing Microsoft-formatted data, as observed in the otherwise failing testTestOptUserClassBroken.Changes Made
FromBytesMethod:Why This Fix Is Necessary
TestOptUserClassBrokento fail unnecessarily. This change eliminates the error while maintaining functionality for standard inputs.