ACL YANG: Enforce TCP_FLAGS must constraint in ACL YANG model#25357
Merged
yxieca merged 10 commits intosonic-net:masterfrom Mar 17, 2026
Merged
ACL YANG: Enforce TCP_FLAGS must constraint in ACL YANG model#25357yxieca merged 10 commits intosonic-net:masterfrom
yxieca merged 10 commits intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ef47832 to
3e0bb98
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
cfac15d to
2245d06
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
cddcd98 to
d4f5fdd
Compare
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
b442c17 to
97d57c7
Compare
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1504af2 to
0269234
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
e2a27d5 to
3adade9
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.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
r12f
approved these changes
Mar 14, 2026
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Xincun Li <stli@microsoft.com>
Signed-off-by: Xincun Li <stli@microsoft.com>
Signed-off-by: Xincun Li <stli@microsoft.com>
Signed-off-by: Xincun Li <stli@microsoft.com>
Signed-off-by: Xincun Li <stli@microsoft.com>
Signed-off-by: Xincun Li <stli@microsoft.com>
Signed-off-by: Xincun Li <stli@microsoft.com>
3592070 to
5113fa2
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vaibhavhd
approved these changes
Mar 17, 2026
arlakshm
pushed a commit
to arlakshm/sonic-buildimage
that referenced
this pull request
Apr 1, 2026
…net#25357) Why I did it: Improve ACL YANG model by enforcing that TCP_FLAGS can only be used in ACL table types that explicitly support this match field, ensuring correct model behavior and configuration validation. How I did it: Updated the ACL YANG model to add a must constraint for TCP_FLAGS. Added/updated test cases and configuration to verify the new constraint. How to verify it: Validate the ACL YANG model with various configs. Incorrect usage of TCP_FLAGS now triggers a must constraint error. Signed-off-by: Xincun Li <stli@microsoft.com> Signed-off-by: arlakshm <arlakshm@microsoft.com>
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.
Why I did it
To improve the ACL YANG model by enforcing that TCP_FLAGS can only be used in ACL table types that explicitly support this match field, ensuring correct model behavior and configuration validation.
Work item tracking
How I did it
How to verify it
{ "ACL_RULE": { "FROM_HOST_DACL|RULE_2001": { "IP_PROTOCOL": "6", "L4_SRC_PORT": "16500", "PACKET_ACTION": "FORWARD", "PRIORITY": "10", "TCP_FLAGS": "0x12/0x12" } }, "ACL_TABLE": { ... "FROM_HOST_DACL": { "policy_desc": "Test ACL Table for TCP_FLAGS validation", "stage": "INGRESS", "type": "L3_L4" }, ... "ACL_TABLE_TYPE": { "L3_L4": { "ACTIONS": [ "PACKET_ACTION", "COUNTER" ], "BIND_POINTS": [ "PORT" ], "MATCHES": [ "DST_IP", "DST_IPV6", "ETHER_TYPE", "IN_PORTS", "L4_DST_PORT", "L4_DST_PORT_RANGE", "IP_PROTOCOL", "IP_TYPE", "SRC_IP", "TCP_FLAGS" ] } },Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)