cb899874dc
The new routing_algo site.conf value BATMAN_IV_LEGACY is introduced. With these changes, the routing_algo setting becomes mandatory. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
20 lines
715 B
Lua
20 lines
715 B
Lua
-- mesh/vxlan is required in single domain setups (this_domain() is nil)
|
|
need_boolean(in_domain({'mesh', 'vxlan'}), not this_domain())
|
|
|
|
need_number({'mesh', 'batman_adv', 'gw_sel_class'}, false)
|
|
|
|
|
|
local allowed_algos = {}
|
|
local has_compat_14 = (os.execute('exec ls "$IPKG_INSTROOT"/lib/gluon/mesh-batman-adv/compat-14 >/dev/null 2>&1') == 0)
|
|
local has_compat_15 = (os.execute('exec ls "$IPKG_INSTROOT"/lib/gluon/mesh-batman-adv/compat-15 >/dev/null 2>&1') == 0)
|
|
|
|
if has_compat_14 then
|
|
table.insert(allowed_algos, 'BATMAN_IV_LEGACY')
|
|
end
|
|
if has_compat_15 then
|
|
table.insert(allowed_algos, 'BATMAN_IV')
|
|
table.insert(allowed_algos, 'BATMAN_V')
|
|
end
|
|
|
|
need_one_of({'mesh', 'batman_adv', 'routing_algo'}, allowed_algos)
|