allow sites to alter mesh interface MTU

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2015-01-18 07:07:20 +01:00
parent d3127aea87
commit a2da534054
1 changed files with 8 additions and 3 deletions

View File

@ -26,6 +26,11 @@ local function configure_radio(radio, index, config)
)
local mesh = 'mesh_' .. radio
local mtu = 1528
if config.mesh_mtu then
mtu = config.mesh_mtu
end
uci:delete('network', mesh)
uci:delete('network', mesh .. '_vbatadv')
@ -33,14 +38,14 @@ local function configure_radio(radio, index, config)
uci:section('network', 'interface', mesh,
{
proto = 'none',
mtu = '1532',
mtu = mtu + 4,
}
)
uci:section('network', 'interface', mesh .. '_vbatadv',
{
ifname = '@' .. mesh .. '.' .. config.vlan_batadv,
proto = 'batadv',
mtu = '1528',
mtu = mtu,
mesh = 'bat0',
}
)
@ -48,7 +53,7 @@ local function configure_radio(radio, index, config)
uci:section('network', 'interface', mesh,
{
proto = 'batadv',
mtu = '1528',
mtu = mtu,
mesh = 'bat0',
}
)