From 688cf3af5c5cfa9ac41eda8834194f6c77cc1267 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 18 Jan 2015 06:23:16 +0100 Subject: [PATCH] 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 --- .../upgrade/mesh-batman-adv-core/invariant/020-wireless | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gluon/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/mesh-batman-adv-core/invariant/020-wireless b/gluon/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/mesh-batman-adv-core/invariant/020-wireless index aa9b18e..67fd240 100755 --- a/gluon/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/mesh-batman-adv-core/invariant/020-wireless +++ b/gluon/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/mesh-batman-adv-core/invariant/020-wireless @@ -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',