[dhcp4relay] Apply configured maximum hop count - #123
Draft
Xichen96 wants to merge 1 commit into
Draft
Conversation
Use the RFC-recommended default while preserving the absolute supported maximum, and propagate parsed configuration into active VLAN relay state. 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). |
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:
Apply configured DHCPv4 maximum hop counts to active per-VLAN relay state and
use the YANG/RFC-recommended default of 4, while retaining 16 as the distinct
absolute supported maximum.
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?
DHCPMgrparsesmax_hop_count, but the main relay event path does not copy itinto the active VLAN configuration. Runtime behavior therefore remains at the
native struct default, which was incorrectly conflated with the absolute limit
of 16 instead of the configured/YANG default of 4.
How did you do it?
max_hop_countinto the active VLANrelay_config.propagation.
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:
[dhcp_relay] Verify configured DHCP relay hop limits sonic-mgmt#26321 — configured 2 with
incoming
hops=2must drop, and configured 4 with incominghops=3must forward after increment.
daemon restart.
Documentation
Behavior aligns the native default with the existing YANG contract and RFC 1542
recommended configurable threshold while preserving the absolute limit of 16.