mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Fix conf_overwrite vlan/mgmt conflict
The pattern /^vlan\s+\d{1,4}\b/ matched both VLAN membership entries
(vlan N <ports>) 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.
This commit is contained in:
+2
-1
@@ -32,7 +32,8 @@ const conf_overwrite = [
|
|||||||
/^syslog\s+ip\b/,
|
/^syslog\s+ip\b/,
|
||||||
/^syslog\b/,
|
/^syslog\b/,
|
||||||
/^passwd\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/,
|
/^pvid\s+\d{1,2}\b/,
|
||||||
/^ingress\b/,
|
/^ingress\b/,
|
||||||
/^port\s+\d{1,2}\s+name\b/,
|
/^port\s+\d{1,2}\s+name\b/,
|
||||||
|
|||||||
Reference in New Issue
Block a user