* [PATCH] bridge: vlan: reject reserved VLAN ID 4095
@ 2026-05-11 1:23 William Gonzalez
0 siblings, 0 replies; only message in thread
From: William Gonzalez @ 2026-05-11 1:23 UTC (permalink / raw)
To: netdev; +Cc: William Gonzalez
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)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-11 1:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 1:23 [PATCH] bridge: vlan: reject reserved VLAN ID 4095 William Gonzalez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox