Skip to content
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]Fixing Ethertype field regex in acl rule yang to accept decimal values #26

Closed
wants to merge 1 commit into from

Conversation

dgsudharsan
Copy link
Owner

@dgsudharsan dgsudharsan commented Feb 18, 2022

Why I did it

The ACL RULE table field ETHER_TYPE can accept both hex as well as decimal values. However yang model didn't allow decimal values. Fixed it to allow decimal values (same pattern as in hex (1536-65535)

How I did it

Modified yang model

How to verify it

Added UT to verify.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

https://github.com/Azure/SONiC/wiki/Configuration#acl-and-mirroring

A picture of a cute animal (not mandatory but encouraged)

@dgsudharsan dgsudharsan changed the title [yang]Fixing Ethertype field regex in acl rule yang to accept decimal… [yang]Fixing Ethertype field regex in acl rule yang to accept decimal values Feb 18, 2022
@@ -152,7 +152,7 @@ module sonic-acl {

leaf ETHER_TYPE {
type string {
pattern "0x0[6-9a-fA-F][0-9a-fA-F]{2}|0x[1-9a-fA-F][0-9a-fA-F]{3}";
pattern "0x0[6-9a-fA-F][0-9a-fA-F]{2}|0x[1-9a-fA-F][0-9a-fA-F]{3}|153[6-9]|15[4-9][0-9]|1[6-9][0-9][0-9]|[2-9][0-9]{3}|[1-5][0-9]{4}|6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since both dec and hex are all supported, is it possible to validate against the range [0, 65535]?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Kebo,
I believe the intention is to restrict the ethertypes to ethernet specific values which start from 1536 or 0x600
https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xhtml. So I didn't want to change the behavior.

@dgsudharsan dgsudharsan closed this Mar 1, 2022
dgsudharsan pushed a commit that referenced this pull request Mar 8, 2022
ce72b0d Longxiang Lyu Thu Feb 24 06:05:12 2022 Put handler member functions as virtual in base (#30)
ef59e4f Jing Zhang Fri Feb 25 11:38:28 2022 Incrementing tolerance on mux state inconsistency (#27)
2d12892 Longxiang Lyu Wed Feb 16 03:32:06 2022 Rename LinkManagerStateMachine to ActiveStandbyStateMachine (#26)
f38634c Jing Zhang Thu Feb 17 17:23:56 2022 Update log level for mux probing and mux state chance (#23)
a8434dd Jing Zhang Thu Feb 17 17:21:01 2022 Handle xcvrd crashing scenarios (#22)
2ebdb2b Longxiang Lyu Mon Feb 14 13:26:07 2022 [make] Enable make extra includes (#24)
dgsudharsan pushed a commit that referenced this pull request Dec 22, 2022
Added below commits:
9b30690 jcaiMR Fri Dec 16 fix handleSwssNotification crash in dhcp6relay (#28)
047afb7 jcaiMR Wed Dec 14 14:08:58 2022 +0800 Fix multiple vlan issue (#27)
ff6bec3 Vivek Thu Dec 8 09:44:15 2022 -0800 Made the Error log informative (#22)
2fbe729 jcaiMR Wed Nov 30 14:41:53 2022 +0800 disable cfg dynamic change (#25)
13d0805 Liu Shilong Wed Nov 30 10:54:11 2022 +0800 Use github code scanning instead of LGTM (#26)
1e846f6 kellyyeh Wed Nov 23 14:36:02 2022 -0800 Fix packet range check for relay-reply packets (#21)
4d19e13 kellyyeh Thu Nov 17 10:04:53 2022 -0800 Add unittest infrastructure (#5)
7f4fdab jcaiMR Fri Nov 11 14:47:51 2022 +0800 fix packet range check issue (#20)
257ecdf kellyyeh Thu Nov 3 11:34:11 2022 -0700 Add client packet UDP header length check (#19)
dgsudharsan pushed a commit that referenced this pull request Feb 16, 2023


advance dhcp relay for 202211

4bf1868 - (HEAD, origin/master, origin/HEAD, master) fix relay-reply dhcpv6 packet counter issue (add support for a7050 qx32 platform #29) (2 weeks ago) [jcaiMR]
9b30690 - fix handleSwssNotification crash in dhcp6relay (Add libnl-nf-3-200 to docker-team #28) (4 weeks ago) [jcaiMR]
047afb7 - Fix multiple vlan issue (Failure trying to run: chroot /sonic-buildimage/fsroot mount -t proc proc /proc #27) (4 weeks ago) [jcaiMR]
ff6bec3 - Made the Error log informative (add python-tenjin as build dependency for p4-switch #22) (5 weeks ago) [Vivek]
2fbe729 - disable cfg dynamic change (p4: fix build dependency for python-p4c-bm #25) (6 weeks ago) [jcaiMR]
13d0805 - Use github code scanning instead of LGTM (Removed sx-libnl from Mellanox containers dependencies. #26) (6 weeks ago) [Liu Shilong]
1e846f6 - Fix packet range check for relay-reply packets (update sonic-swss and p4-switch submodule to fix docker sonic p4 bug #21) (7 weeks ago) [kellyyeh]
4d19e13 - Add unittest infrastructure (Cavium customization for docker containers #5) (8 weeks ago) [kellyyeh]
7f4fdab - fix packet range check issue (Makefile: add build dependency for python-p4c-bm #20) (9 weeks ago) [jcaiMR]
257ecdf - Add client packet UDP header length check (change port_config.ini directory for s6000 #19) (2 months ago) [kellyyeh]
dgsudharsan pushed a commit that referenced this pull request Sep 17, 2024
…tically (sonic-net#20199)

#### Why I did it
src/sonic-dash-api
```
* 0b33087 - (HEAD -> master, origin/master, origin/HEAD) Add local region ID field to Dash appliance table (#26) (31 hours ago) [Mukesh Moopath Velayudhan]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants