-
-
Notifications
You must be signed in to change notification settings - Fork 113
Description
I just tested a network with no Batman-adv but only Babeld, on top of OpenWrt 18.06 (initially spotted when testing on OpenWrt 19.07-rc2, where the same problem is present): wireless mesh links do not work.
When adding all the protocols but list protocols batadv:%N1 in the /etc/config/lime-node, the routing over the wireless links stops working (while the cabled ones are still ok). Needless to say, when both Batman-adv and Babeld are present everything works.
But it works just because the broken routing is "patched" as the packets flow through bat0.
My setup has 4 nodes:
Commercial AP with internet - - - - LibreMesh wireless client (10.13.40.169) ------ LibreMesh AP + mesh (10.13.104.0) - - - - LibreMesh AP + mesh (10.13.123.8)
the ping to the internet from the third router works (i.e. the cabled link works), but from the fourth does not work (i.e. the wireless link does not work).
The Babeld dump (echo dump | nc ::1 30003) looks good both in the third and in the fourth router, and does not change when adding or removing Batman-adv.
Third router routes:
# ip route show
default via 10.13.40.169 dev eth0-1_17 proto babel onlink
10.13.0.0/16 dev br-lan proto kernel scope link src 10.13.104.0
10.13.0.0/16 dev anygw proto kernel scope link src 10.13.0.1
ping to the internet works (via eth0-1_17) and ping to the second router (10.13.40.169) works (as it is reachable from the LAN network included in br-lan).
Fourth router routes:
# ip route show
default via 10.13.104.0 dev wlan1-mesh_17 proto babel onlink
10.13.0.0/16 dev br-lan proto kernel scope link src 10.13.123.8
10.13.0.0/16 dev anygw proto kernel scope link src 10.13.0.1
Ping to the internet is sent through wlan1-mesh_17 but the reply does not arrive as the third router sends it through br-lan, which does not include the mesh interface.
Ping to the third router (10.13.104.0) is sent through br-lan and does not even get to the third router as the mesh interface is not included in br-lan.
When Batman-adv is present, the connection magically works, even if the routes are identical to the ones I have shown here, but works in a stupid way I think:
the reply of the ping from the fourth router to the internet finds its way back as bat0 is included in br-lan; the ping to the third router works even if it's sent through br-lan as it includes bat0 which includes wlan1-mesh_29.
Using tcpdump I checked that this happens: pinging the internet, the outwards ping goes through wlan1-mesh_17 (Babeld interface) and the reply arrives from wlan1-mesh_29 (included in bat0); pinging the third router wlan1-mesh_17 does not have any traffic and everything flows through wlan1-mesh_29.
In my opinion this is a bug (limits the MTU and maybe the performances) which is caused by the fact that Babeld interfaces have only /32 IPv4 addresses which does not allow the packets to be routed through it. I don't know the solution but I think that Babeld should be in charge to announce more meaningful routes.
The option babeld_over_batman proposed in #631 could be used for enabling or disabling this kind of things, but by default Babeld routed packets should not pass through bat0.