Repository navigation
[intfmgr]: Validate interface table keys - #4845
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. |
ashutosh-agrawal
force-pushed
the
fix/intfmgr-interface-key-validation
branch
from
August 27, 2026 19:35
ebb1b8b to
48537af
Compare
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Reject malformed identifiers before processing interface entries and construct command operands safely. Signed-off-by: Ashutosh Agrawal <ashu@cisco.com>
ashutosh-agrawal
force-pushed
the
fix/intfmgr-interface-key-validation
branch
from
September 16, 2026 19:18
48537af to
42b5d7c
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:22
|
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). |
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). |
Member
Author
|
/azpw retry |
Collaborator
|
Retrying failed(or canceled) jobs... |
Collaborator
|
Retrying failed(or canceled) stages in build 1226782: ✅Stage Test:
|
Member
Author
|
/azpw retry |
Collaborator
|
Retrying failed(or canceled) jobs... |
Collaborator
|
Retrying failed(or canceled) stages in build 1226782: ✅Stage Test:
|
Member
Author
|
/azpw retry |
Collaborator
|
Retrying failed(or canceled) jobs... |
Collaborator
|
Retrying failed(or canceled) stages in build 1226782: ✅Stage Test:
|
Member
Author
|
/azpw retry |
Collaborator
|
Retrying failed(or canceled) jobs... |
Collaborator
|
Retrying failed(or canceled) stages in build 1226782: ✅Stage Test:
|
Member
Author
|
/azpw retry |
Collaborator
|
Retrying failed(or canceled) jobs... |
Collaborator
|
Retrying failed(or canceled) stages in build 1226782: ✅Stage Test:
|
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 interface names at the point where
intfmgrdconsumes general and address table keys. The check usesswss::isInterfaceNameValid()from sonic-swss-common, so this consumer follows the same interface-name rules as the other SWSS components using the shared helper.Issue: no GitHub issue is linked.
Type of change
Approach
What is the motivation for this PR?
intfmgrdprocesses keys read from Redis at runtime. That path should validate the identifier it is about to use instead of assuming every writer has already applied schema validation. Keeping the syntax rule in sonic-swss-common avoids each daemon growing a slightly different interface-name check.How did you do it?
Validate interface names at the point where
intfmgrdconsumes general and address table keys. The check usesswss::isInterfaceNameValid()from sonic-swss-common, so this consumer follows the same interface-name rules as the other SWSS components using the shared helper.This also tightens two related parsing paths:
Ethernet00is not treated as a key forEthernet0.Interface and address values used in shell commands are quoted after validation/parsing. Valid interface names and prefixes continue through the existing processing path unchanged.
Depends on the shared validator added by sonic-swss-common #1240, which is merged. This PR contains only the
intfmgrdconsumer changes.How did you verify/test it?
tests_intfmgrdin 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.