luci: VLAN config not working properly

When I’m creating 2 new VLANs in 23.05.3 on my Cudy WR1300 v3 all is working fine in the first view. I change the bridge LAN and add VLAN 1 untagged all ports also VLAN 140 tagged all ports for Guest WiFi with multiple APs. The configuration is looking fine. Relating to https://github.com/openwrt/luci/issues/5948 I saw that vlan_filtering is set to 0.


# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option packet_steering '1'
        option ula_prefix 'fd9f:f265:6dcf::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        option vlan_filtering '0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.130.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option gateway '192.168.2.1'
        list dns '8.8.8.8'

config interface 'wan'
        option device 'wan'
        option proto 'static'
        option ipaddr '192.168.2.2'
        option gateway '192.168.2.1'
        option netmask '255.255.255.0'
        list dns '8.8.8.8'
        list dns '8.8.4.4'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config route
        option interface 'lan'
        option target '0.0.0.0/0'
        option gateway '192.168.2.2'

config route
        option interface 'wan'
        option target '0.0.0.0/0'
        option gateway '192.168.2.1'

config device
        option name 'phy1-ap0'

config interface 'Gast'
        option proto 'static'
        option device 'br-lan.140'
        option ipaddr '192.168.140.1'
        option netmask '255.255.255.0'

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'eth0:u*'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan3:u*'
        list ports 'lan4:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '140'
        list ports 'eth0:t'
        list ports 'lan1:t'
        list ports 'lan2:t'
        list ports 'lan3:t'
        list ports 'lan4:t'

But if I add one or more VLAN to this bridge the vlan_filtering tag has been deleted by uci. And my network device crashes. image

image

image

I think the deletion of vlan_filtering is wrong and it should be still vlan_filtering 0 In second step the vlans should be activated with a separate activation button or something like this.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

I think this are two parts. One is Luci. The Vlan filtering checkbox is not correspondign with the vlan filtering Option. Another option can be to write in the documentation that VLAN filtering checkbox is also checking the vlan_filtering on CPU level or something like that. Another one are my issues with my device which can be also a bug but not a luci bug I will reply there in the forum https://forum.openwrt.org/t/cudy-wr1300-v3-23-05-3-add-vlans-crashes-network-adapter/204059/5

The issue contains with the VLAN filtering checkbox. If you set filtering checkbox but you don’t define any vlans the vlan_filtering tag is set to 1 image If you define a VLAN without checking this checkbox manually VLAN filtering tag won’t be set by luci image

I think in this case the checkbox shouldn’t be set and the tag should set to 0

Uncheck the box manually the tag will set to 0 image

I only saved this config and don’t apply it. When I’m adding now the second VLAN The tag will be deleted accidentally I think it should be still on 0 and the checkbox shouldn’t be checked image

The issue seems to be in this file but last time I worked with js was 20 years ago 😦 https://github.com/openwrt/luci/blob/071fc1bc92980454b6701d9394711b9d758f332a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js#L85 or here https://github.com/openwrt/luci/blob/071fc1bc92980454b6701d9394711b9d758f332a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js#L913