-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Yang] Incorrect restriction for ICMP/ICMPv6 type and code. #18137
Comments
@qiluo-msft, can you triage this issue in the yang subgroup |
Assign this to Qi, please help to take a look and see if someone can help. Thanks. |
FYI, In the implementation of openconfig, it defines each ICMPv6 type in Yang model. https://github.com/openconfig/public/blob/master/release/models/acl/openconfig-icmpv6-types.yang |
12 tasks
@bingwang-ms Can we close this issue? |
Closed by #18311 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
For ICMP, sonic-acl.yang.j2 require
type
between 1 and 44, andcode
between 1 and 16. However, this is incorrect. For example, according to RFC 792, type=0 and code=0 means echo reply message. These are valid ICMP type/code but cannot pass Yang validation.For ICMPv6, sonic-acl.yang.j2 also require
type
between 1 and 44, andcode
between 1 and 16. This is incorrect, too. For example, according to RFC 4443, type=129 and code=0 means echo reply message.Steps to reproduce the issue:
Currently, this issue impacts GCU dataplane ACL update. Below is the repro steps:
a. Write below content to file
acl_table_types.json
on DUT:sonic-cfggen -j acl_table_types.json -w
sudo config acl add table SAMPLE_DATAPLANE_ACL_TABLE BMCDATAV6 -d SAMPLE -s ingress -p Ethernet1,Ethernet2
acl-loader
:a. Write below content to
acl_rules.json
file on DUT:acl-loader update full acl_rules.json
a. Write below content to file
patch.json
on DUT:sudo config apply-patch patch.json
Describe the results you received:
At step 4.b, I got below error on DUT:
Describe the results you expected:
Expect step 4.b can apply the second ACL rule on DUT successfully.
Output of
show version
:I can repro this issue on 202205 image.
Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: