gluon-mesh-batman-adv-core: unconditionally set the WAN MAC address
This fixes MAC address conflicts on devices which use the eth0 as primary address.
This commit is contained in:
parent
855f973f1f
commit
05432947cd
@ -1,14 +1,11 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
local util = require 'gluon.util'
|
||||
local uci = require('luci.model.uci').cursor()
|
||||
|
||||
|
||||
if sysconfig.wan_ifname:match('%.') then
|
||||
-- fix up duplicate mac addresses (for mesh-on-WAN)
|
||||
uci:set('network', 'wan', 'macaddr', util.generate_mac(1, 0))
|
||||
uci:save('network')
|
||||
uci:commit('network')
|
||||
end
|
||||
-- fix up duplicate mac addresses (for mesh-on-WAN)
|
||||
uci:set('network', 'wan', 'macaddr', util.generate_mac(1, 0))
|
||||
uci:save('network')
|
||||
uci:commit('network')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user