Skip to content

Conversation

@G10h4ck
Copy link
Member

@G10h4ck G10h4ck commented Jun 18, 2020

This PR re-enable batman-adv meshing over ethernet, this solve bla2 loops when nodes sees each other both via ethernet and wifi, the log flooding is avoided changing the mac-address of the vlan, this trick didn't worked in the past as the unicast packets never arrived to the vlan interface as they were probably sucked in by the bridge on top of the plain ethernet interface.

I have been testing this for a few days in a real network with 9 devices distributed across 3 houses with plenty of nodes which see each other both over cable and over WiFi, no loops observed and no log flooding either. Finally!

@ilario
Copy link
Member

ilario commented Jun 18, 2020

Great!! Thanks!!
Did you test using OpenWrt 18.06 or 19.07?
Maybe we should also update the tests? @spiccinini

assert.is.equal('batadv_hardif', uci:get("network", "lm_net_batadv_dummy_if", "proto"))
assert.is.equal('bat0', uci:get("network", "lm_net_batadv_dummy_if", "master"))

@G10h4ck
Copy link
Member Author

G10h4ck commented Jun 18, 2020

I have tested with librerouterOS v1.2
and yes it looks like the tests need to be updated, but I'd prefer if we could test this properly for example with 2 or 3 virtual machines running and checking that both unicast and multicast traffic is getting to the vlan interfaces, is this possible? Otherwise the test is checking just that the generated configuration doesn't change...

Copy link
Contributor

@spiccinini spiccinini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have at the moment a network to test it. Code looks good. Yes the tests should be updated, and yes in this case the current test don't test the network facility, only that the code does what it says and that we don't introduce regressions while we do refactorings.

G10h4ck added 2 commits June 20, 2020 11:32
Thanks Ilario for suggestion
@G10h4ck
Copy link
Member Author

G10h4ck commented Jun 20, 2020

I have updated the tests, how can i run them?

@codecov-commenter
Copy link

Codecov Report

Merging #726 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #726      +/-   ##
==========================================
- Coverage   73.34%   73.33%   -0.02%     
==========================================
  Files          32       32              
  Lines        2506     2505       -1     
==========================================
- Hits         1838     1837       -1     
  Misses        668      668              
Impacted Files Coverage Δ
...oto-batadv/files/usr/lib/lua/lime/proto/batadv.lua 96.66% <100.00%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 658cd27...60e4cf2. Read the comment docs.

@spiccinini
Copy link
Contributor

Great!
There is a run_tests script in the root of the repo. For more details see TESTING.md

@G10h4ck
Copy link
Member Author

G10h4ck commented Jun 22, 2020

Thanks! Unit tests runs fine too, can we merge this?

Copy link
Contributor

@spiccinini spiccinini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Can you please update the PR description and maybe also the title with the purpose of this PR? This enables batman on LAN, right?

@G10h4ck G10h4ck changed the title Batadv ifmacaddresses replaces replaces #703 #724 Batman-adv enable meshing over ethernet replaces #703 #724 Jun 23, 2020
@spiccinini
Copy link
Contributor

Thanks gio!

Copy link
Member

@ilario ilario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested on OpenWrt 19.07 and it looks very good to me :D

@G10h4ck G10h4ck merged commit 5b3a34d into libremesh:master Jun 25, 2020
@G10h4ck
Copy link
Member Author

G10h4ck commented Jun 25, 2020

Thanks for testing and review!

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

Successfully merging this pull request may close these issues.

4 participants