[dhcp_relay] Cover first-hop requests with Option 82#26322
Draft
Xichen96 wants to merge 1 commit into
Draft
Conversation
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). |
| self.agent_relay_mode == "discard" | ||
| or self.dhcpv4_disable_flag | ||
| or self.max_hop_count == self.MAX_HOP_COUNT | ||
| ) |
Add native relay coverage for a zero-giaddr request carrying a pre-existing Option 82 and require that no upstream DHCP packet is emitted. 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-test
branch
from
July 19, 2026 17:39
626c963 to
0269949
Compare
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
6 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:
Add focused native-relay coverage for a first-hop DHCP request with
giaddrzero and a pre-existing Option 82. The test requires that no DHCP packet is emitted upstream and keeps the packet as a true first-hop request rather than converting it to a chained request.This is a low-priority draft placeholder for a non-current deployment scenario. It depends on sonic-net/sonic-dhcp-relay#124 and may intentionally fail on current images until that product dependency merges. DRAFT — MUST NOT MERGE.
Fixes # N/A — draft test placeholder; no issue is linked.
Type of change
Back port request
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO): N/A; no backport requested.
Failure type: other — low-priority test coverage gap for a non-current deployment scenario.
Tested branch
Test result
NOT RUN: no pytest, PTF, syntax-check, or hardware validation was executed.
Validation is intentionally deferred until the higher-priority DHCP relay PRs merge.
This draft must not merge before its dependency and validation TODOs are complete.
Dependency TODO: rebase/validate after [dhcp4relay] Reject first-hop requests with relay information sonic-dhcp-relay#124 merges.
Validation TODO: run the focused native hardware/PTF case after the higher-priority DHCP relay PRs merge.
Approach
What is the motivation for this PR?
Native sonic-relay-agent currently treats zero-giaddr requests with Option 82 as ordinary first-hop traffic and can add another relay option instead of rejecting them.
How did you do it?
Configure discard mode, send a synthetic zero-giaddr request carrying Option 82 from the client side, and use a broad upstream DHCP negative match so malformed forwarded variants cannot produce a false pass.
How did you verify/test it?
No validation was executed. Validation is deferred until the higher-priority DHCP relay PRs merge. This draft must not merge before the dependency and validation TODOs above are complete.
Any platform specific information?
Scoped to native sonic-relay-agent. ISC behavior is intentionally not asserted because the shared relay_agent fixture has agent-specific setup and semantics.
Supported testbed topology if it's a new test case?
Existing t0 and m0 DHCP relay topologies; unsupported relay agents remain excluded.
Documentation
No documentation update. This draft only adds or corrects DHCP relay test coverage.