Skip to content
Snippets Groups Projects
Commit 05432947 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 855f973f
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.
Please register or to comment