networks: wan interface should not be treated as bridge
Upon saving configuration of an interfaces group (wan, lan, guest) without any interfaces, uci config option bridge_empty 1
is added to that interfaces group. Meaning that even empty bridge should stay being type bridge, because we might assign some interfaces to it later.
However, we still consider wan
interface as special case of an interface with single physical device, therefore we should not set bridge_empty 1
to interfaces that are not bridges.
This option is most likely ignored when applied to non-bridge device, but it is misleading, confusing and it might break network configuration on more recent Turris OS releases.
How to reproduce
- TOS 6.0+
- MOX with more than one ethernet interface (AC/AE).
Wan assigned
config interface 'wan'
option proto 'dhcp'
option ipv6 '1'
option device 'eth0'
config device 'br_lan'
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
WAN unassigned (e.g. wifi AP)
config interface 'wan'
option proto 'dhcp'
option ipv6 '1'
option bridge_empty '1'
config device 'br_lan'
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
list ports 'eth0'
WAN reassigned again
config interface 'wan'
option proto 'dhcp'
option ipv6 '1'
option bridge_empty '1'
option device 'eth0'
config device 'br_lan'
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'