Skip to content
Snippets Groups Projects
Commit a64483a3 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Merge branch 'mesh-announce-interfaces' of https://github.com/freifunk-gluon/packages

parents b2a55f29 ae4c130c
No related branches found
No related tags found
No related merge requests found
require 'ubus'
local conn = ubus.connect()
local list = util.exec('batctl if')
local interfaces = {}
for _, line in ipairs(util.split(list)) do
local ifname = line:match('^(.-):')
if ifname ~= nil then
local status = conn:call("network.device", "status", { name = ifname })
table.insert(interfaces, status['macaddr'])
end
end
return interfaces
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment