Fix missing vlan tag in advance networking (#993)

* Fix missing vlans tags when vlan saved before ports selected
This commit is contained in:
Tim Wilkinson 2023-12-06 11:46:38 -08:00 committed by GitHub
parent bf3aa67f78
commit 2100e45495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -100,6 +100,9 @@ function read_user_config(network)
m = line:match("option%s+vlan%s+'(%d+)'")
if m then
config.vlan = tonumber(m)
if config.vlan == 2 or config.vlan >= 4 then
config.tagged = true
end
end
m = line:match("list%s+ports%s+'(%S+):u'")
if m then
@ -482,7 +485,6 @@ html.print([[
}
});
function port_change(input, network, port, checked) {
console.log(network, port, checked)
const config = configs.find(c => c.name == network);
if (!config.tagged && checked) {
configs.forEach(config => {