gluon/package/gluon-mesh-batman-adv-core/check_site.lua
Nils Schneider 2a93c58042 mesh-batadv-core: introduce 11s mesh, refactor wireless config
This is a site.conf-breaking change in regard to the wireless config.
Make sure to read http://gluon.readthedocs.org/en/latest/user/site.html
and update your site.conf accordingly!

Support for 802.11s mesh interfaces has been added. Gluon now supports
three interface types: ap, ibss and mesh. All of them are now optional
and may be configured independently in site.conf.

A sample site.conf may look like this:

    wifi24 = {
            channel = 1,
            htmode = 'HT40+',
            ap = {
                    ssid = 'luebeck.freifunk.net',
            },
            ibss = {
                    ssid = '02:d1:11:37:fc:38',
                    bssid = '02:d1:11:37:fc:38',
                    mcast_rate = 12000,
            },
            mesh = {
                    id = 'ffhl-mesh',
                    mcast_rate = 12000,
            },
    },
2015-08-04 23:05:29 +02:00

29 lines
936 B
Lua

need_string('regdom')
for _, config in ipairs({'wifi24', 'wifi5'}) do
need_number(config .. '.channel')
need_string(config .. '.htmode')
if need_table(config .. '.ap', nil, false) then
need_string(config .. '.ap.ssid')
need_boolean(config .. '.ap.disabled', false)
end
if need_table(config .. '.ibss', nil, false) then
need_string(config .. '.ibss.ssid')
need_string_match(config .. '.ibss.bssid', '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$')
need_number(config .. '.ibss.mcast_rate', false)
need_number(config .. '.ibss.vlan', false)
need_boolean(config .. '.ibss.disabled', false)
end
if need_table(config .. '.mesh', nil, false) then
need_string(config .. '.mesh.id')
need_number(config .. '.mesh.mcast_rate', false)
need_boolean(config .. '.mesh.disabled', false)
end
end
need_boolean('mesh_on_wan', false)
need_boolean('mesh_on_lan', false)