get_interface_address() calls io.open() and dereferences the result
without checking it. /sys/class/net does not contain interfaces
only: with the bonding module loaded it also holds the plain file
bonding_masters, which the `ls -1` in get_interfaces_names() returns
and which has no address below it. io.open() then returns nil and
the script dies with "attempt to index a nil value", so no bat-hosts
data is published at all on such a node.
Return nil when the file cannot be opened and skip those entries in
the caller, which would otherwise index the interface table with
nil. get_hostname() gets the same guard.
Reported-by: openwrt-ai[bot]
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
alfred is a user space daemon for distributing arbitrary local
information (e.g. hostnames or vis data) over a batman-adv mesh
network in a decentralized fashion via IPv6 link-local multicast.
Moved from the openwrt/routing feed, as discussed in
https://github.com/openwrt/routing/issues/184.
The one deviation from the feed copy is SUBMENU:=Wireless, which the
feed copy does not set at all: without it the package sits ungrouped at
the top of the Network menu. Wireless keeps it next to mesh11sd and
batctl, which move across with the same value. A dedicated Mesh submenu
is the better home for all three and is worth adding once enough of the
mesh packages have landed to justify it.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>