Skip to content
Snippets Groups Projects
Commit 34e0451e authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

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.
parent f5764a4a
No related branches found
No related tags found
No related merge requests found
#!/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')
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