-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Babeld without VLAN on ethernet interfaces inside br-lan #600
Conversation
b6bd1e0
to
fd4aaec
Compare
fd4aaec
to
fbe0bc8
Compare
@@ -23,7 +23,7 @@ define Package/$(PKG_NAME) | |||
URL:=http://libremesh.org | |||
DEPENDS:=+dnsmasq-dhcpv6 @(!PACKAGE_dnsmasq) +ebtables +libuci-lua \ | |||
+lime-system +lua +kmod-ebtables +kmod-macvlan \ | |||
+shared-state +shared-state-dnsmasq_leases | |||
+shared-state +shared-state-dnsmasq_leases +kmod-ebtables-ipv6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you fixed this in another PR? here it seems unrelated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That kernel module is needed both by anygw (see #599) and Babeld in case of no VLAN and presence of Batman.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gosh, now I noticed that this file was actually not pertaining to this PR, sorry.
--! the bridge interface br-lan | ||
--! If Babeld's Hello packets run over Batman-adv (whose bat0 is also | ||
--! included in br-lan), the links will have a wrong quality metric, | ||
--! so these hello on bat0 have to be filtered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not that they have a wrong quality metric, it's that babeld will see all nodes as direct neighbours through batman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mh... Isn't this the same? But ok, I'll change the text :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no it is not the same
elseif(proto == "batadv") then hasBatman = true end | ||
end | ||
|
||
if hasLan and ifname:match("^eth%d") then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens with wan port? Or port manually configured with ground routing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also consider to move this to configure method as it don't seems to need to be run for each interface, run it once seems enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens with wan port?
Woops... With this PR, WAN port is not anymore used by Babeld.
This was unintentional, sorry.
Anyway WAN port is used for connecting to non-LibreMesh networks, so Babeld is not needed there.
I am ok with fixing it if we want Babeld on WAN.
Rather than checking for lan protocol, I can check for the presence of the interface into the
config interface 'lan'
list ifname 'bat0'
list ifname 'eth0.1'
table.
Or port manually configured with ground routing?
Ports configured with specific configuration are not treated by the whole section.
Do you mean that even if ground routing ports have a specific configuration, they should trigger this fix anyway? Are them included into br-lan bridge?
Also consider to move this to configure method as it don't seems to need to be run for each interface, run it once seems enough
Sounds good!
Currently it runs more than once even if running once would be ok.
Running more than once is not detrimental but I agree that it is a waste.
If I put this into the configure, it would be executed even if no ethernet lan port is present, but I suppose this is ok, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also consider to move this to configure method as it don't seems to need to be run for each interface, run it once seems enough
If I put this into the configure, it would be executed even if no ethernet lan port is present, but I suppose this is ok, right?
Wait, the ebtables rule can be in the configuration part, but the ifname = "br-lan"
stuff has to stay into the setup interface one...
This is a mess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ports configured with specific configuration are not treated by the whole section.
Do you mean that even if ground routing ports have a specific configuration, they should trigger this fix anyway? Are them included into br-lan bridge?
It all depends on what kind of configuration they got, if they have babled specified as proto they get there too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a mess.
Networking is a complex problem, every apparently dumb change usually have unexpectedly complex implications to handle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ports configured with specific configuration are not treated by the whole section.
I was wrong, interfaces with specific configuration are treated by this section.
Do you mean that even if ground routing ports have a specific configuration, they should trigger this fix anyway? Are them included into br-lan bridge?
The answer to my question was: no, interfaces configured via ground routing should not be touched by this fix and they will never be included in br-lan.
It all depends on what kind of configuration they got, if they have babled specified as proto they get there too
Interfaces managed by ground routing will never have VLAN ID 0, right? If this is correct, they will never trigger the fix and the problem is solved. Otherwise, how can I check if the interface is also configured for ground routing?
I tested these modifications and it works. I think I addressed all the comments. |
@spiccinini could you advise about where to insert the MTU fix from #601? |
The fix from #601 should be enough, it lowers the MTU only when using vlans (vid !=0) |
@@ -51,6 +51,7 @@ config lime network | |||
option bmx7_over_batman false | |||
option bmx7_pref_gw none # Force bmx7 to use a specific gateway to Internet (hostname must be used as identifier) | |||
option bmx7_wifi_rate_max 'auto' | |||
option babeld_over_batman false # When Babeld is run without VLAN (babeld:0), it runs on the bridge which includes Batman-adv's bat0, keeping this false avoids to have Babeld metrics distorted by Batman-adv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilario When someone would want to change from false
to true
? If there is not known useful use case I prefer not to add more options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you, and I'll remove this.
I added this originally just because the same was present for BMX6 over Batman-adv
Replaced by #631 |
Fix #596
Part of the code has been copied and pasted from BMX6 (which run on br-lan by default).
We want to support running Babeld without VLAN (
list protocols babeld:0
) because:But Babeld cannot run directly on an interface (e.g.
eth0
oreth0.1
) which is included into a bridge (e.g.br-lan
) because it cannot have an IPv6 Link-Local.What have that is the bridge itself, so Babeld has to run on the bridge.
But the bridge includes
bat0
(Batman-adv stuff) which assures that all the packets get through, distorting the way that Babeld has for determining the metric of a route (sending UDP packets and checking how many get lost).Maybe the configurable option
babeld_over_batman
is not useful and we can consider that it is always false?I am still testing this PR, please review but wait for merging :)