I have a DFrobot CM4 IoT Router that I'm running the latest snapshot on, upgraded over time using sysupgrade from older snapshots.
The device uses the standard RPI4 ethernet and wifi interfaces, and also has a r8169 pci ethernet interface, which is loaded using the r8169 module.
My lan is on the br-lan interface:
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1'
list ports 'phy0-ap0'
option stp '1'
option bridge_empty '1'
Everything used to come up just fine on a reboot, but now I have to manually add eth1 (the r8169 interface) to the br-lan bridge and run /etc/init.d network restart before br-lan gets the proper setup for my lan.
Did something change recently with the network interface bringup where there is possibly a timing issue?
(I will say that the wifi interface was long broken on my system, but is now working again, so maybe phy0-ap0 now being part of the bridge is a new variable.)
I would note that everything works once I add eth1 to the bridge and restart networking, but if I add those steps to a startup script, that does not fix the issue.
My next step is to convert this to wait for the condition, but is there a better way?
if grep -Fxq up /sys/class/net/eth1/operstate ; then
brctl addif br-lan eth1
/etc/init.d/network restart
fi
Remove wifi port from the bridge. It never worked like that.
Wifi connects to the bridge specified in Network/Wireless/Edit AP -> select only ONE of networks, likely LAN.
Yes in the wireless section/config you see option network 'lan' this adds the wifi 'device' into whatever bridge the 'lan' 'interface' is assigned to ( usually br-lan by default )