so i finally spent a couple of days and resumed working on libre-mesh :D
* first task was to make an "altermesh-system" that would include only
batman-adv, but no bmx6 or anygw magic.
This would not be retrocompatible with legacy altermesh, since batman
versions are incompatible (2012.4.0 vs 2014.2.0) but the setup and
functionality should be similar.
Thanks to the impressive modularization work made by gioacchino all
these past months, it was unexpectedly simple as compiling an image with
lime-system, lime-proto-batadv, and that was it, mostly everything
worked out of the box :D (i didn't even needed to create a metapackage
to test)
So, it is all very very promising! I estimate this week we can have with
nico an "altermesh" cloud running live, but based completely on
libre-mesh codebase.
instead of going ahead and creating the altermesh-system metapackage, i
went back and refactored a little bit of code to tidy things up,
addressing some bad/unexpected details i have been seeing in lime-system
these past months, but didn't have time to fix yet
a quick summary:
* /etc/resolv.conf was overwritten, which kinda break the normal
resolution system
(it should only contain 127.0.0.1, and dnsmasq reads
/tmp/resolv.conf.auto to find out about upstream servers)
now lime-defaults.network.resolvers are copied to
dhcp.(a)dnsmasq[0].server and everything works as expected again
* /etc/uci-defaults/95-lime-init-enable failed with 1 on boot
the whole lime-init unique-in-its-kind hack was split into scripts
placed at the "expected" places: /etc/firewall.user.d/* for iptables or
ebtables stuff, /etc/rc.local.d/* for other hacky stuff.
* iptables -t nat -A POSTROUTING -o $wan -j MASQUERADE
needed to be manually added on gateways. Now the stock firewall system
is back in place, we have the MASQUERADE rule for free.
* dnsmasq-2.66-5 had a hardcoding bug on the dns lifetime announced in
RAs, which triggered clients disconnect and reconnect every 20 mins
(very annoying)
openwrt-BB-rc1 ships with dnsmasq-2.71-3, a version where the bug is
fixed (dns lifetime is now equal to router lifetime)
* reworked dnsmasq-lease-share to use a different approach, instead of
maintaining the leases database, and restarting every 5 minutes (yuck!)
it writes a dhcp-hostsfile, which dnsmasq can re-read without a full
restart.
* found out another shortcoming of the anygw black magic and dnsmasq
white magic: the ra-names feature doesn't work at all in lime-full,
since the icmpv6 packet dnsmasq uses to SLAAC-CONFIRM hosts, goes out
through anygw but comes back through br-lan, and dnsmasq misses it. So,
there's no AAAA resolution at all in lime-full :(
we encountered a similar issue with dhcpv4 but worked around it with
dhcp-needs-broadcast. At some point, we should bump the thread at
dnsmasq-discuss and look for a proper solution.
* the dhcp-hostsfile approach vs leasefile-ro approach: dhcp-hostsfile
has the benefit of not having to do a full restart, but on the other
hand ra-names is not tried at all. Given the previous item / bug,
(ra-names is not working anyway), it's better to stay with
dhcp-hostsfile approach, and avoid dnsmasq restarts.
will continue working tomorrow, but wanted to send huge kudos to gio for
all the work done so far, a heads-up to the rest of the team, and that
i'm back in business :D
cheers!!
gui
Show replies by date