Repository navigation
[teammgr]: Validate port channel table keys - #4846
Open
ashutosh-agrawal wants to merge 3 commits into
Open
ashutosh-agrawal wants to merge 3 commits into
ashutosh-agrawal wants to merge 3 commits into
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). |
Member
Author
|
Temporarily paused until the shared interface-name helper is available on master. |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
/azp run |
ashutosh-agrawal
force-pushed
the
fix/teammgr-interface-key-validation
branch
from
August 27, 2026 19:36
69721ae to
6809449
Compare
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Reject malformed LAG and member identifiers before processing and construct command operands safely. Signed-off-by: Ashutosh Agrawal <ashu@cisco.com>
ashutosh-agrawal
force-pushed
the
fix/teammgr-interface-key-validation
branch
from
September 16, 2026 19:18
6809449 to
d1011c8
Compare
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ashutosh-agrawal
marked this pull request as ready for review
September 16, 2026 19:23
ashutosh-agrawal
requested review from
judyjoseph and
prsunny
as code owners
September 16, 2026 19:23
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Member
Author
|
/azpw run |
Collaborator
|
Retrying failed(or canceled) jobs... |
Collaborator
|
Retrying failed(or canceled) stages in build 1223245: ✅Stage Test:
|
Signed-off-by: Ashutosh Agrawal <ashu@cisco.com>
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
qiluo-msft
reviewed
Sep 19, 2026
Signed-off-by: Ashutosh Agrawal <ashu@cisco.com>
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
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:
Validate port-channel and member names where
teammgrdconsumes LAG, LAG-member, and port-state entries. The checks useswss::isInterfaceNameValid()from sonic-swss-common.Issue: no GitHub issue is linked.
Type of change
Approach
What is the motivation for this PR?
teammgrdreceives compound keys from Redis and later uses their components in interface operations and command arguments. Validating both components at the consumer boundary prevents malformed keys from being partially parsed, while the shared helper keeps the accepted interface syntax consistent across SWSS daemons.How did you do it?
Validate port-channel and member names where
teammgrdconsumes LAG, LAG-member, and port-state entries. The checks useswss::isInterfaceNameValid()from sonic-swss-common.Member keys are parsed in one helper and are accepted only when they contain exactly one port-channel name and one member name. The same validation is applied before interface lookup and LAG member add/remove operations. Names passed to
teamd,teamdctl, and interface commands are quoted, and theifreqcopy is length-bounded.Valid port-channel and member entries continue through the existing lifecycle path unchanged.
Depends on the shared validator added by sonic-swss-common #1240, which is merged. This PR contains only the
teammgrdconsumer changes.How did you verify/test it?
tests_teammgrdin the Bookworm environment.Any platform specific information?
No platform-specific behavior is described in this change.
Documentation
No documentation change is described for this fix.