use constant name for batadv vlan

as only one vlan carrying batadv is supported, use a constant interface name
this prevents left-over interfaces when sysupgrading to a new vlan setting

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2015-01-18 06:23:16 +01:00
parent 9b1eb8478f
commit 688cf3af5c
1 changed files with 3 additions and 5 deletions

View File

@ -27,16 +27,14 @@ local function configure_radio(radio, index, config)
local mesh = 'mesh_' .. radio
uci:delete('network', mesh)
uci:delete('network', mesh .. '_vbatadv')
if config.vlan_batadv then
local meshif = mesh .. '_' .. config.vlan_batadv
local meshifn = '@' .. mesh .. '.' .. config.vlan_batadv
uci:section('network', 'interface', mesh,
{ proto = 'none', mtu = '1536',})
uci:delete('network', meshif)
uci:section('network', 'interface', meshif,
uci:section('network', 'interface', mesh .. '_vbatadv',
{
ifname = meshifn,
ifname = '@' .. mesh .. '.' .. config.vlan_batadv,
proto = 'batadv',
mtu = '1532',
mesh = 'bat0',