libremesh / lime-packages

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

fix bridge device section confusion #1061

Closed pony1k closed 11 months ago

pony1k commented 11 months ago

Bridge ports are added to the first device section, which may be the wrong one. This changes the behaviour follwing @ilario s suggestion. Now, the first device section that has type bridge and the name br-lan will be used. After reading the /bin/config_generate script in OpenWrt base-files I am confident that there will always be such a device section on first boot.

fixes #1060

codecov-commenter commented 11 months ago

Codecov Report

Merging #1061 (96590e9) into master (4c51c7e) will increase coverage by 0.01%. The diff coverage is 100.00%.

:exclamation: Current head 96590e9 differs from pull request most recent head 0bf768e. Consider uploading reports for the commit 0bf768e to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master    #1061      +/-   ##
==========================================
+ Coverage   79.67%   79.69%   +0.01%     
==========================================
  Files          53       53              
  Lines        4542     4550       +8     
==========================================
+ Hits         3619     3626       +7     
- Misses        923      924       +1     
Files Coverage Δ
...s/lime-system/files/usr/lib/lua/lime/proto/lan.lua 80.00% <100.00%> (+3.40%) :arrow_up:

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

ilario commented 11 months ago

Wow this looks veeerrrry nice!!!!!

And it also solves, in a more elegant way, the problem patched in https://github.com/libremesh/lime-packages/pull/1027/commits/6b72b3b385ae1989388d24ddf297058e4c218bce

Did you test on OpenWrt 22.03 also?

@spiccinini @G10h4ck check this out

G10h4ck commented 11 months ago

Seems good to me, thanks @pony1k

pony1k commented 11 months ago

I tested it on

By tested I mean I removed all ports from the bridge device section and see if lime-config brings them back. For me is fine to be merged.