From 718745e7b52e78fa4a4cf8c59909648bc1d6075a Mon Sep 17 00:00:00 2001 From: Erdnusschokolade <96622762+Erdnusschokolade@users.noreply.github.com> Date: Sat, 20 Jun 2026 08:00:54 +0200 Subject: [PATCH] Reduce stale management VLAN entries on config save The firmware has a single management VLAN (one management_vlan variable), so a stored config should never carry more than one "vlan N mgmt" line. When parsing a mgmt command, drop any previously stored mgmt entry so repeatedly changing the management VLAN no longer accumulates stale lines. --- html/config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/config.js b/html/config.js index fd426e9..d54a556 100644 --- a/html/config.js +++ b/html/config.js @@ -77,6 +77,9 @@ function parseConf(s){ break; } } + // Only one management VLAN can be active, so drop any previous mgmt entry + if (/^vlan\s+\d{1,4}\s+mgmt$/.test(line)) + configuration = configuration.filter(item => !/^vlan\s+\d{1,4}\s+mgmt$/.test(item)); configuration.push(line); } console.log("Configuration now:");