Git Product home page Git Product logo

Comments (5)

ilario avatar ilario commented on September 26, 2024

Quoting OpenWrt's wiki:

Configuration for batman-adv from 2019.1 and onward is done in /etc/config/network (only). There is no /etc/config/batman-adv file used with current versions.

https://openwrt.org/docs/guide-user/network/wifi/mesh/batman#general

So this is broken since some time, as OpenWrt 19.07 used batman-adv 2019.2
https://github.com/openwrt/routing/blob/openwrt-19.07/batman-adv/Makefile#L12

But it was working on OpenWrt 18.06 as it used batman-adv 2018.1
https://github.com/openwrt/routing/blob/openwrt-18.06/batman-adv/Makefile#L12

from lime-packages.

ilario avatar ilario commented on September 26, 2024

From here it seems easy to fix just setting the same option in /etc/config/network under the bat0 interface:

config interface 'bat0'
	option proto 'batadv'
	[...]
	option gw_mode 'off'

https://openwrt.org/docs/guide-user/network/wifi/mesh/batman#associate_batman-adv_with_mesh

Some other interesting info can be located in the documentation of gw_mode:

Gateway mode, if set to server other nodes are notified of that node's internet connection and must be complemented by gw_bandwidth, that notifies the algorithm that server is one of the best paths for internet access.
If set to client, the criteria by which batman-adv will choose a gateway(other nodes with gw_mode set as server) is required to be set with gw_sel_class.

https://openwrt.org/docs/guide-user/network/wifi/mesh/batman#batman-adv_options_for_bat0_the_main_mesh_interface

So it is possible that it will not work without gw_bandwidth and gw_sel_class.

from lime-packages.

ilario avatar ilario commented on September 26, 2024

Also, and this was broken also in LibreMesh 2020.1, this line

[ "$(uci -q get batman-adv.bat0.gw_mode)" == "client" ] || exit 0

has to point to network.bat0.gw_mode='client' (at least on OpenWrt 19.07, I did not try on other versions).

from lime-packages.

ilario avatar ilario commented on September 26, 2024

And this file is not there anymore, still have to check where it went:

if grep -q "^=>" /sys/kernel/debug/batman_adv/bat0/gateways ; then

from lime-packages.

ilario avatar ilario commented on September 26, 2024

And this file is not there anymore, still have to check where it went:

if grep -q "^=>" /sys/kernel/debug/batman_adv/bat0/gateways ; then

Surprise: it is not there because this package does not select-depend on CONFIG_BATMAN_ADV_DEBUGFS, so it has never been there and the /etc/hotplug.d/net/99-batman-gw in:

if grep -q "^=>" /sys/kernel/debug/batman_adv/bat0/gateways ; then
BATTYPE=gw BATACTION=del /etc/hotplug.d/net/99-batman-gw
fi
batctl gw_mode server

has never been executed.

I was looking a bit on the rest of the code and a new interface gets generated here
https://github.com/libremesh/lime-packages/blob/master/packages/batman-adv-auto-gw-mode/files/etc/uci-defaults/91_batman-adv-auto-gw-mode

with DHCP (so it starts looking for an IP). And stops offering for an IP. But stops offering on the br-lan interface, not on the Anygw's lm_net_br_lan_anygw_if where dnsmasq is running nowadays.

Basically this is an outdated package and unless anyone is willing to adopt it I would propose to eliminate it (or move to an archive directory in this same repository) in favor of the more recent babeld-auto-gw-mode
https://github.com/libremesh/lime-packages/tree/06399e5de7fb7b9d3cf13c19f7bf70accb11299a/packages/babeld-auto-gw-mode

Opinions @spiccinini @selankon @G10h4ck @altergui ?

from lime-packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.