-
Notifications
You must be signed in to change notification settings - Fork 543
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
After reboot, ACL bound to VLAN interface does not work #3061
base: master
Are you sure you want to change the base?
After reboot, ACL bound to VLAN interface does not work #3061
Conversation
when ACL is bound to VLAN interface and then user saves config and gives reboot. ACL will not work. RCA: After reboot, ACL is configured first and then VLAN is created. Due to this ordering issue, ACL table is created without being bound to the VLAN interface. FIX: When the VLAN interface is created, notification of port change is sent to ACLOrch Class. ACLOrch handles the notification and binds the ACL table to the VLAN interface post creation. Similarly, ACL needs to be removed from the VLAN before deleting the VLAN interface. Otherwise, VLAN deletion will fail due to reference count error.
Tests are missing for this PR. Can you please add some? |
Hi @ArthiGovindaraj , if I recall correctly, VLAN is expanded into physical ports when binding a VLAN to an ACL table. So can you please help me understand how does this issue happen? |
Hi @bingwang-ms , Yes, you are right. Using CLICK command we cannot bind ACL to vlan interface. I have given the steps in the attached file: Let me know if any further details are needed. |
Hi @ArthiGovindaraj |
For further acceptance of these changes,
Let me know your inputs. |
when ACL is bound to VLAN interface and then user saves config and gives reboot. ACL will not work.
What I did
ISSUE: when ACL is bound to VLAN interface and then user saves config and gives reboot. ACL will not work.
RCA: After reboot, ACL is configured first and then VLAN is created.
Due to this ordering issue, ACL table is created without being bound to the VLAN interface.
FIX: When the VLAN interface is created, notification of port change is sent to ACLOrch Class.
ACLOrch handles the notification and binds the ACL table to the VLAN interface post creation. Similarly, ACL needs to be removed from the VLAN before deleting the VLAN interface. Otherwise, VLAN deletion will fail due to reference count error.
Why I did it
If Issue is not fixed, after reboot ACL bound to VLAN interface will not work.
How I verified it
Create ACL table with ACL rule to drop matching traffic
Bind ACL table to Vlan interface <Vlan 25>
Create VLAN 25 and bind members to VLAN after this.
ACL counters bound to the VLAN interface should increment and packet should get dropped.
root@sonic:~# aclshow -a
RULE NAME TABLE NAME PRIO PACKETS COUNT BYTES COUNT
acl_rule_001 acl_table_001 1 51560 5089600
Remove the ACL table
Delete the VLAN interface.
On deleting VLAN interface with ACL bound to it, error is seen in syslog and VLAN deletion fails.
Details if related