gluon-mesh-batman-adv: do not override WAN MAC address with VXLAN

As a partial fix to #496, do not touch the MAC address of the WAN
interface when using VXLANs (as only the MAC address of the VXLAN
interface matters to batman-adv).
This commit is contained in:
Matthias Schiffer 2020-05-08 22:58:14 +02:00 committed by Martin Weinelt
parent a3569da164
commit b842ec43ff

View File

@ -1,10 +1,15 @@
#!/usr/bin/lua
local site = require 'gluon.site'
local util = require 'gluon.util'
local uci = require('simple-uci').cursor()
-- fix up potentially duplicate MAC addresses (for meshing)
uci:set('network', 'wan', 'macaddr', util.generate_mac(0))
if not site.mesh.vxlan(true) then
uci:set('network', 'wan', 'macaddr', util.generate_mac(0))
else
uci:delete('network', 'wan', 'macaddr')
end
uci:set('network', 'mesh_lan', 'macaddr', util.generate_mac(4))
uci:save('network')