2018-04-27 15:36:47 +00:00
|
|
|
-- mesh/vxlan is required in single domain setups (this_domain() is nil)
|
|
|
|
need_boolean(in_domain({'mesh', 'vxlan'}), not this_domain())
|
|
|
|
|
2018-01-19 09:12:43 +00:00
|
|
|
need_number({'mesh', 'batman_adv', 'gw_sel_class'}, false)
|
2019-07-27 05:40:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
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)
|