[dhcp4relay] Reject first-hop requests with relay information#124
Draft
Xichen96 wants to merge 2 commits into
Draft
[dhcp4relay] Reject first-hop requests with relay information#124Xichen96 wants to merge 2 commits into
Xichen96 wants to merge 2 commits into
Conversation
Drop untrusted first-hop requests that already carry Option 82 before assigning giaddr or appending relay information. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b881aa9-3a3a-4aaf-b2ca-b941705b2438 Signed-off-by: Xichen96 <lukelin0907@gmail.com>
Collaborator
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Walk DHCP options with cookie, length, PAD, and END validation so bytes after END cannot trigger the untrusted first-hop drop. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b881aa9-3a3a-4aaf-b2ca-b941705b2438 Signed-off-by: Xichen96 <lukelin0907@gmail.com>
Xichen96
force-pushed
the
dev/xichenlin/item10-first-hop-option82
branch
from
July 19, 2026 17:52
8f0a9b7 to
81379c2
Compare
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
21 tasks
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.
Description of PR
Summary:
Reject a zero-
giaddrDHCP request that already contains Option 82 before therelay assigns
giaddror appends another relay information option.This is a low-priority placeholder for a non-current deployment scenario. This
draft must not merge yet.
Type of change
Approach
What is the motivation for this PR?
SONiC has no trusted-circuit configuration. RFC 3046 safe untrusted behavior,
and the SONiC ISC relay default, require dropping a first-hop request that
already carries relay information. The native relay currently assigns
giaddrand appends a duplicate Option 82.
How did you do it?
giaddrclient requests.packet.
send_udpis not called,giaddrand hops remain unchanged, and no duplicate option is appended.
How did you verify/test it?
Focused native unit code is included but was NOT RUN, per explicit test
deferral. Test execution is deferred until the higher-priority DHCP relay PRs
listed below merge.
Any platform specific information?
None. This covers a lower-priority, non-current deployment scenario.
Dependencies and future validation TODOs
Validation sequencing depends on these higher-priority relay PRs merging first
(no code dependency; this branch is independently based on fresh
origin/master):Before marking ready or merging:
giaddrDHCP with apre-existing Option 82 and proves no packet reaches the upstream server:
[dhcp_relay] Cover first-hop requests with Option 82 sonic-mgmt#26322
Documentation
Behavior follows RFC 3046 untrusted-circuit handling and the SONiC ISC default.