Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-mod-network: LAN interface setting #4948

Closed
castiel652 opened this issue Mar 28, 2021 · 4 comments
Closed

luci-mod-network: LAN interface setting #4948

castiel652 opened this issue Mar 28, 2021 · 4 comments

Comments

@castiel652
Copy link

With latest commit 9ff45c9
After at least changing the settings of LAN interface once, LuCI always does this uci del network.lan.type to /etc/config/network if you click save on the LAN interface setting page.

@jow-
Copy link
Contributor

jow- commented Mar 28, 2021

Please provide your complete /etc/config/network and steps to reproduce it. I am unable to trigger that issue in an x86/64 Qemu image.

@castiel652
Copy link
Author

castiel652 commented Mar 29, 2021

My apology.

I did more testing and it's because of IGMP snooping

R7800 with DSA
Fresh install and before enabling IGMP snooping

root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd87:5ec2:3d19::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'lan1 lan2 lan3 lan4'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'wan'
        option proto 'dhcp'

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

After enabling IGMP snooping

root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd87:5ec2:3d19::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'lan1 lan2 lan3 lan4'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'wan'
        option proto 'dhcp'

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

config device
        option name 'br-lan'
        option igmp_snooping '1'
        option multicast_querier '0'

After IGMP snooping enabled, changing LAN interface settings will have this behavior
image
I won't be able to reach the router if I click Save&Apply

@jow-
Copy link
Contributor

jow- commented Mar 29, 2021

Thanks @castiel652 - that was helpful.

@jow- jow- closed this as completed in a9a223b Mar 29, 2021
semprini96 pushed a commit to semprini96/luci that referenced this issue Apr 13, 2021
When setting bridge and device specific options such 'stp' or
'igmp_snooping', LuCI so far transparently created or reused a
`config device` section and set the corresponding option there.

In the case of bridges, this triggers multiple problems:

 - When implicitely creating a `config device` section referring to the
   bridge device, the legacy bridge configuration of the corresponding
   interface is disabled, causing a broken configuration on subsequent
   save operations

 - Netifd does not appear to properly merge bridge settings from config
   device and config interface sections, leading to an incoherent
   configuration state

In order to avoid that issue, do not automatically migrate bridge specific
options.

Fixes: openwrt#4948
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a9a223b)
@lcsaszar
Copy link

I have the same issue. After upgrading luci-mod-network to git-21.140.43486-398982f, it says:

The existing network configuration needs to be changed for LuCi to function properly. Upon pressing “Continue”, bridges configuration will be moved from “interface” sections to “device” sections the network will be restarted to apply the updated configuration.

After the change my bridged interfaces are no accessible. I can restore fuctionality if I add option type 'bridge' back to config interface 'lan' section, and add my bridged ports lan1, lan2, lan3, and lan4 with brctl addif br-lan lan1 command (and same for the other ports). But this is not compatible with LuCi network configuration page.

rmilecki pushed a commit that referenced this issue May 27, 2021
When setting bridge and device specific options such 'stp' or
'igmp_snooping', LuCI so far transparently created or reused a
`config device` section and set the corresponding option there.

In the case of bridges, this triggers multiple problems:

 - When implicitely creating a `config device` section referring to the
   bridge device, the legacy bridge configuration of the corresponding
   interface is disabled, causing a broken configuration on subsequent
   save operations

 - Netifd does not appear to properly merge bridge settings from config
   device and config interface sections, leading to an incoherent
   configuration state

In order to avoid that issue, do not automatically migrate bridge specific
options.

Fixes: #4948
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a9a223b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants