From dcc60c38247fac20eb07c2e10e72feed05815949 Mon Sep 17 00:00:00 2001 From: Erdnusschokolade <96622762+Erdnusschokolade@users.noreply.github.com> Date: Sun, 24 May 2026 10:51:20 +0200 Subject: [PATCH] Fix conf_overwrite vlan/mgmt conflict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pattern /^vlan\s+\d{1,4}\b/ matched both VLAN membership entries (vlan N ) and management entries (vlan N mgmt), causing them to overwrite each other in configuration[]. When saving, whichever form came last in the cmd_log would dedupe the other out of the final config — resulting in either lost membership or a stale mgmt setting. Split into two patterns using negative lookahead: - /^vlan\s+\d{1,4}\s+mgmt$/ matches only mgmt entries - /^vlan\s+\d{1,4}(?!\s+mgmt\b)/ matches everything else Both dedup independently. Discovered via hardware test on 6XH-X where 'vlan 44 mgmt' silently dropped 'vlan 44 management 2t 5u' from saved config, locking out web UI on next boot. --- html/config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/config.js b/html/config.js index 5b292e2..dd8512b 100644 --- a/html/config.js +++ b/html/config.js @@ -32,7 +32,8 @@ const conf_overwrite = [ /^syslog\s+ip\b/, /^syslog\b/, /^passwd\b/, - /^vlan\s+\d{1,4}\b/, + /^vlan\s+\d{1,4}\s+mgmt$/, + /^vlan\s+\d{1,4}(?!\s+mgmt\b)/, /^pvid\s+\d{1,2}\b/, /^ingress\b/, /^port\s+\d{1,2}\s+name\b/,