From 4eaf16f96d84525c416f63380561e2a26f9ee807 Mon Sep 17 00:00:00 2001 From: Erdnusschokolade <96622762+Erdnusschokolade@users.noreply.github.com> Date: Sat, 20 Jun 2026 08:13:43 +0200 Subject: [PATCH] Drop dead exact-match check in vlan delete filter A bare "vlan N" line never matches conf_cmds (a VLAN entry always carries a member port or the mgmt/name keyword), so it is never stored. The c !== "vlan N" comparison could therefore never match an entry; the startsWith(prefix) check alone covers all stored vlan lines. --- html/config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/html/config.js b/html/config.js index d54a556..6efa283 100644 --- a/html/config.js +++ b/html/config.js @@ -59,8 +59,7 @@ function parseConf(s){ const deleteMatch = line.match(/^vlan\s+(\d{1,4})\s+d$/); if (deleteMatch) { const prefix = "vlan " + deleteMatch[1] + " "; - configuration = configuration.filter(c => - c !== "vlan " + deleteMatch[1] && !c.startsWith(prefix)); + configuration = configuration.filter(c => !c.startsWith(prefix)); continue; } console.log(l + ' --> ' + line);