mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
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.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user