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: c73a12e0ea
This commit is contained in:
parent
c05f28d1a3
commit
86ef9b0e97
@ -21,7 +21,7 @@ local function configure_client(config, radio, index, suffix)
|
||||
|
||||
uci:delete('wireless', name)
|
||||
|
||||
macaddr = util.generate_mac(3*index)
|
||||
macaddr = util.generate_mac(3*(index-1))
|
||||
|
||||
if config and macaddr then
|
||||
uci:section('wireless', 'wifi-iface', name,
|
||||
|
@ -29,7 +29,7 @@ local function configure_ibss(config, radio, index, suffix, disabled)
|
||||
uci:delete('network', name .. '_vlan')
|
||||
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.vlan then
|
||||
@ -79,7 +79,7 @@ local function configure_mesh(config, radio, index, suffix, disabled)
|
||||
uci:delete('network', 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
|
||||
uci:section('network', 'interface', name,
|
||||
|
Loading…
Reference in New Issue
Block a user