libremesh / lime-packages

LibreMesh packages configuring OpenWrt for wireless mesh networking
https://libremesh.org/
GNU Affero General Public License v3.0
281 stars 96 forks source link

lime-proto-lan confuses bridge device section #1060

Closed pony1k closed 1 year ago

pony1k commented 1 year ago

After installing OpenWrt 23.05.0 with current master branch (https://github.com/libremesh/lime-packages/commit/4c51c7e062c3dff6c5218ee797d5a79c2ad6bc3d) onto an avm fritz4020 I found the following in /etc/config/network:

config device                               
        option name 'eth1'                                
        option macaddr '44:4E:6D:11:87:D0'                
        list ports 'bat0'                   
        list ports 'eth0.1'                               
        list ports 'eth1'      

The ports should be added to the the bridge device further down. It probably has something to do with this line: https://github.com/libremesh/lime-packages/blob/4c51c7e062c3dff6c5218ee797d5a79c2ad6bc3d/packages/lime-system/files/usr/lib/lua/lime/proto/lan.lua#L51-L53

pony1k commented 1 year ago

Moving the device section with option type 'bridge' before the eth1 device section fixed it for me.

ilario commented 1 year ago

Argh, looks like a big assumption we made is failing. We assumed that the bridge is always the first device in the network file. We assumed that because that section has no name, so it is difficult to address it properly. An alternative would be to check which section has the type bridge, I suppose.

Maybe someone from OpenWrt can suggest how to do that the right way? @hauke @dangowrt @aparcar @BKPepe