From 1701d4dc53c0060b840434969dc288b47b1064e9 Mon Sep 17 00:00:00 2001 From: d00f Date: Sat, 8 Aug 2026 17:38:10 +0200 Subject: [PATCH] cmd: refuse a management VLAN that cannot exist "vlan 5000 mgmt" parked the management interface on a VLAN the table cannot hold, which quietly cuts management off. IDs above 4094 now fall through to the usage message. 0 still switches the management VLAN off, which is the documented way to disable it. --- cmd_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd_parser.c b/cmd_parser.c index a7d1d0d..f8bb887 100644 --- a/cmd_parser.c +++ b/cmd_parser.c @@ -347,6 +347,8 @@ void parse_vlan(void) return; } if (cmd_compare(2, "mgmt")) { + if (vlan_settings.vlan > 4094) + goto err; management_vlan = vlan_settings.vlan; if (!vlan_settings.vlan) print_string("Management VLAN disabled\n");