[acl-loader] Identity ICMP v4/v6 based on IP_PROTOCOL for custom ACL table types#2994
Merged
lizhijianrd merged 2 commits intosonic-net:masterfrom Sep 23, 2023
Merged
Conversation
Blueve
reviewed
Sep 22, 2023
Blueve
reviewed
Sep 22, 2023
Blueve
approved these changes
Sep 22, 2023
bingwang-ms
approved these changes
Sep 22, 2023
Contributor
|
LGTM. Thanks for the fix! |
Contributor
Author
|
Hi @StormLiangMS, can you please help to backport this PR to 202305 branch? [ADO: 25230030] |
Contributor
Author
|
Hi @yxieca, can you please help to backport this PR to 202205? [ADO: 25230030] |
Contributor
|
@lizhijianrd, this change cannot be cherry-picked cleanly. Please raise PR. |
lizhijianrd
added a commit
to lizhijianrd/sonic-utilities
that referenced
this pull request
Sep 29, 2023
…table types (sonic-net#2994) What is the motivation for this PR? When adding ICMPv6 ACL rules in custom ACL table type, current acl-loader will incorrectly treat the ACL table as IPv4. I open this PR to fix this bug and let acl-loader identify ICMP v4 or v6 based on IP_PROTOCOL. Also fixed some typo in UT of acl-loader to avoid confusion. How did you do it? In function convert_icmp, add one step to identify the rule is v4 or v6 based on IP_PROTOCOL. How did you verify/test it? Verified by UT. Signed-off-by: Zhijian Li <zhijianli@microsoft.com>
Contributor
Author
Contributor
Thanks @lizhijianrd, automation will handle the submodule advance. |
yxieca
pushed a commit
that referenced
this pull request
Sep 29, 2023
…tom ACL table types (#3003) * [acl-loader] Identity ICMP v4/v6 based on IP_PROTOCOL for custom ACL table types (#2994) What is the motivation for this PR? When adding ICMPv6 ACL rules in custom ACL table type, current acl-loader will incorrectly treat the ACL table as IPv4. I open this PR to fix this bug and let acl-loader identify ICMP v4 or v6 based on IP_PROTOCOL. Also fixed some typo in UT of acl-loader to avoid confusion. How did you do it? In function convert_icmp, add one step to identify the rule is v4 or v6 based on IP_PROTOCOL. How did you verify/test it? Verified by UT. Signed-off-by: Zhijian Li <zhijianli@microsoft.com> * update --------- Signed-off-by: Zhijian Li <zhijianli@microsoft.com>
JunhongMao
pushed a commit
to JunhongMao/sonic-utilities
that referenced
this pull request
Oct 4, 2023
…table types (sonic-net#2994) What is the motivation for this PR? When adding ICMPv6 ACL rules in custom ACL table type, current acl-loader will incorrectly treat the ACL table as IPv4. I open this PR to fix this bug and let acl-loader identify ICMP v4 or v6 based on IP_PROTOCOL. Also fixed some typo in UT of acl-loader to avoid confusion. How did you do it? In function convert_icmp, add one step to identify the rule is v4 or v6 based on IP_PROTOCOL. How did you verify/test it? Verified by UT. Signed-off-by: Zhijian Li <zhijianli@microsoft.com>
StormLiangMS
pushed a commit
that referenced
this pull request
Oct 7, 2023
…table types (#2994) What is the motivation for this PR? When adding ICMPv6 ACL rules in custom ACL table type, current acl-loader will incorrectly treat the ACL table as IPv4. I open this PR to fix this bug and let acl-loader identify ICMP v4 or v6 based on IP_PROTOCOL. Also fixed some typo in UT of acl-loader to avoid confusion. How did you do it? In function convert_icmp, add one step to identify the rule is v4 or v6 based on IP_PROTOCOL. How did you verify/test it? Verified by UT. Signed-off-by: Zhijian Li <zhijianli@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.
What I did
When adding ICMPv6 ACL rules in custom ACL table type, current
acl-loaderwill incorrectly treat the ACL table as IPv4. I open this PR to fix this bug and letacl-loaderidentify ICMP v4 or v6 based on IP_PROTOCOL.Also fixed some typo in UT of acl-loader to avoid confusion.
How I did it
In function
convert_icmp, add one step to identify the rule is v4 or v6 based on IP_PROTOCOL.How to verify it
Verified by UT:
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)