From: Stephen Hemminger <stephen@networkplumber.org>
To: William Gonzalez <gonzalez.williamalexander1@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] bridge: vlan: reject reserved VLAN ID 4095
Date: Sun, 17 May 2026 15:30:29 -0700 [thread overview]
Message-ID: <20260517153029.1500c5a7@phoenix.local> (raw)
In-Reply-To: <20260511012339.71569-1-gonzalez.williamalexander1@gmail.com>
On Sun, 10 May 2026 21:23:39 -0400
William Gonzalez <gonzalez.williamalexander1@gmail.com> wrote:
> The bridge vlan parser currently rejects VLAN IDs greater than or
> equal to 4096, which still allows VLAN ID 4095. VLAN ID 4095 is
> reserved and should not be accepted as a configurable VLAN ID.
>
> Tighten userspace validation to accept only VLAN IDs in the range
> 1..4094.
>
> Signed-off-by: William Gonzalez <gonzalez.williamalexander1@gmail.com>
> ---
Overall looks ok, but you missed the case of vlan range.
If you have chance get rid of the use of atoi() here since that
doesn't handle garbage input well. Instead using get_u16() from utils.c
here instead. Better yet make the get_vlan() a helper in utils.c
and even get_vlan_range() a helper. Other code does bad job of reading
vlans.
prev parent reply other threads:[~2026-05-17 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 1:23 [PATCH] bridge: vlan: reject reserved VLAN ID 4095 William Gonzalez
2026-05-17 22:30 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260517153029.1500c5a7@phoenix.local \
--to=stephen@networkplumber.org \
--cc=gonzalez.williamalexander1@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox