From: William Gonzalez <gonzalez.williamalexander1@gmail.com>
To: netdev@vger.kernel.org
Cc: William Gonzalez <gonzalez.williamalexander1@gmail.com>
Subject: [PATCH] bridge: vlan: reject reserved VLAN ID 4095
Date: Sun, 10 May 2026 21:23:39 -0400 [thread overview]
Message-ID: <20260511012339.71569-1-gonzalez.williamalexander1@gmail.com> (raw)
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>
---
bridge/vlan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bridge/vlan.c b/bridge/vlan.c
index 27d31ba8..09c01153 100644
--- a/bridge/vlan.c
+++ b/bridge/vlan.c
@@ -224,8 +224,8 @@ static int vlan_modify(int cmd, int argc, char **argv)
return -1;
}
- if (vid >= 4096) {
- fprintf(stderr, "Invalid VLAN ID \"%hu\"\n", vid);
+ if (vid < 1 || vid > 4094) {
+ fprintf(stderr, "Invalid VLAN ID \"%d\"\n", vid);
return -1;
}
--
2.39.3 (Apple Git-145)
reply other threads:[~2026-05-11 1:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260511012339.71569-1-gonzalez.williamalexander1@gmail.com \
--to=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