virtualsquare / virtualsquare/vde-2
vlancreate command returns EINVAL when vlan id is 4094
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 255
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
I appears that the vlancreate() function in port.c which is called on the management command "vlan/create" should be valid for a vlan id of 4094. However the if statement checking for validity excludes 4094 "vlan < NUMOFVLAN-1". It also seems that vlanaddport() is afflicted with the same issue with it's vlan id check.
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 in port.c with vlancreate(), which handles the management command "vlan/create", and inspect the VLAN ID checks in both vlancreate() and vlanaddport(). Verify the boundary behavior for VLAN ID 4094 and confirm that the command no longer returns EINVAL and both checks accept the valid ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100