luci-mod-network: do not remove enable_vlan from config 5008/head
authorMichael Pratt <mcpratt@pm.me>
Wed, 21 Apr 2021 22:03:58 +0000 (18:03 -0400)
committerMichael Pratt <mcpratt@pm.me>
Wed, 21 Apr 2021 22:12:43 +0000 (18:12 -0400)
commit51ab737a4ba2b0f2a9d479cf114837c570f8d05c
tree68da46a658c06adde8374839665affafb09eb40a
parentc4f3ac05288ba148fcd5c0222f34f393dbec57a2
luci-mod-network: do not remove enable_vlan from config

There are many switch drivers where VLAN functionality is enabled by default.
In this situation, LuCI cannot be used to disable VLAN functionality,
because removing the line from configuration results in VLAN remaining enabled
by the driver.

When enable_vlan is set to 0 by default
by using functions in board.d,
and an unrelated change is made on the Switch webpage,
then the enable_vlan option gets deleted when changes are saved.

Therefore, the option needs to be preserved, whether set to 0 or 1.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/switch.js