Repository navigation
feat(application): concatenate repeated DHCP options per RFC 3396 (#3200) - #3209
Merged
Merged
Conversation
Documentation build overview
8 files changed ·
|
) A DHCP message's repeated option is one option (RFC 3396 section 7): its instances in the options, then file, then sname fields join into the new DHCPv4.split_options, a SplitOption each, decoded once; every instance keeps its octets, so the message rebuilds byte for byte. message_type reads it, and a split Option Overload option overloads its fields. An option one of whose instances runs past its field is cut short and stays octets. make() refuses fields for a code the aggregate buffer holds more than once, across fields too. BOOTP concatenates nothing: RFC 3396 sections 1 and 7 concatenate the options of a received DHCP packet.
JarryShaw
force-pushed
the
feat/3200-dhcp-rfc3396-concatenation
branch
from
November 29, 2026 04:23
793b6ba to
87e5df1
Compare
Owner
Author
|
Good to go at
|
Contributor
|
Coverage: 94.93% (unit tier, Python 3.15,
Per-file detail: the |
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.
Please follow the guide below
Put an
xinto every box [ ] that applies to your pull request (like this: [x])Use the Preview tab to see how your pull request will look
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeDescribed the user-visible change below and left its changelog entry to the maintainer, keeping
docs/source/changelog/andCHANGELOG.mdout of the diff, if the change is user-visible: N/A — centralisedWhat is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseAlso tick if it regenerates constant or registry tables, members keeping their numeric values (the
constlabel)Description of your pull request and other information
Closes #3200.
file, thensname(§5; RFC 2131 §4.1) are concatenated into the newDHCPv4.split_options, oneSplitOption(Data_SplitOption) per code, decoded once by the code's registered parser. Each instance keeps its octets inoptions, so the message rebuilds byte for byte. A field the Option Overload option leaves out is not part of the buffer.message_typereads it, so a repeated option 53 gives its type rather thanNone. A split Option Overload option overloads its fields. A Domain Search pointer resolves into the joined data (RFC 3397 §2–3).split_optionsentry, as a cut option carried once does.make()refuses fields for a code the aggregate buffer holds more than once, across the fields as well as within one; its parts are given as octets.Tests: the new
SplitOptionTestsintests/protocols/application/test_dhcp_unit.pyfail on anorigin/developexport (7 of 8; the BOOTP one pins the scope), and the DHCP modules stay at 100% statement and branch coverage.tests/protocols/*.py,tests/project,tests/*.py,tests/protocols/{application,transport}and the DHCP integration modules pass. The Sphinx-gated modules pass in adocs/requirements.txtvenv. The only failure,test_conda_dev_release_gate_2458, fails the same way on the export.