Skip to content
Snippets Groups Projects
Unverified Commit 86ef9b0e authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Fix creation of IBSS interfaces on devices with two radios

Lua's tables are 1-based, so we must decrement the index by 1 to get the
desired MAC addresses. By not doing this, the second IBSS interface would
get the address with index 8, but only indices 0..7 are available.

Fixes: c73a12e0
parent c05f28d1
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ local function configure_client(config, radio, index, suffix) ...@@ -21,7 +21,7 @@ local function configure_client(config, radio, index, suffix)
uci:delete('wireless', name) uci:delete('wireless', name)
macaddr = util.generate_mac(3*index) macaddr = util.generate_mac(3*(index-1))
if config and macaddr then if config and macaddr then
uci:section('wireless', 'wifi-iface', name, uci:section('wireless', 'wifi-iface', name,
......
...@@ -29,7 +29,7 @@ local function configure_ibss(config, radio, index, suffix, disabled) ...@@ -29,7 +29,7 @@ local function configure_ibss(config, radio, index, suffix, disabled)
uci:delete('network', name .. '_vlan') uci:delete('network', name .. '_vlan')
uci:delete('wireless', name) uci:delete('wireless', name)
macaddr = util.generate_mac(3*index+2) macaddr = util.generate_mac(3*(index-1)+2)
if config and macaddr then if config and macaddr then
if config.vlan then if config.vlan then
...@@ -79,7 +79,7 @@ local function configure_mesh(config, radio, index, suffix, disabled) ...@@ -79,7 +79,7 @@ local function configure_mesh(config, radio, index, suffix, disabled)
uci:delete('network', name) uci:delete('network', name)
uci:delete('wireless', name) uci:delete('wireless', name)
macaddr = util.generate_mac(3*index+1) macaddr = util.generate_mac(3*(index-1)+1)
if config and macaddr then if config and macaddr then
uci:section('network', 'interface', name, uci:section('network', 'interface', name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment