virtualsquare / virtualsquare/vde-2

vlancreate command returns EINVAL when vlan id is 4094

Open
#48 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.