sonic-mgmt-framework icon indicating copy to clipboard operation
sonic-mgmt-framework copied to clipboard

sonic-vlan allows 2 untagged vlans on the same interface

Open aseaudi opened this issue 2 years ago • 0 comments

Try to add interface Ethernet0 as a VLAN Member under Vlan100 as untagged, using Restconf, it is accepted, and added in config_db. Then, if we try to add Ethernet0 as a VLAN member under Vlan200 as untagged, again, it is accepted, and it is added in the CONFIG_DB. This is not correct, as now Ethernet0 is using Vlan100 untagged and Vlan200 untagged at the same time. The config CLI will not allow this, it will give user an error saying there's already one untagged vlan for Ethernet0. How can we stop Restconf from accepting more than one untagged vlan on the same port ? We tried playing around with some must() conditions in the sonic-vlan yang model, but we finally found out that the cvl does not read the VLAN_MEMBER table, if we try to add a new item in VLAN_MEMBER, so the must() condition cannot see the existing untagged vlans. Any ideas ?

aseaudi avatar Jul 13 '22 09:07 aseaudi