sonic-net / sonic-net/sonic-mgmt-framework
sonic-vlan allows 2 untagged vlans on the same interface
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 37
- Forks
- 122
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 3
Description
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 ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing RESTCONF validation for the sonic-vlan YANG model and how CVL handles new VLAN_MEMBER entries, then compare it with the CLI's existing single-untagged-VLAN check. Confirm how the VLAN_MEMBER table and CONFIG_DB are exposed during validation; done means a second untagged membership on the same interface is rejected by RESTCONF.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100