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:
parent
a3569da164
commit
b842ec43ff
@ -1,10 +1,15 @@
|
|||||||
#!/usr/bin/lua
|
#!/usr/bin/lua
|
||||||
|
|
||||||
|
local site = require 'gluon.site'
|
||||||
local util = require 'gluon.util'
|
local util = require 'gluon.util'
|
||||||
local uci = require('simple-uci').cursor()
|
local uci = require('simple-uci').cursor()
|
||||||
|
|
||||||
|
|
||||||
-- fix up potentially duplicate MAC addresses (for meshing)
|
-- 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:set('network', 'mesh_lan', 'macaddr', util.generate_mac(4))
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
|
Loading…
Reference in New Issue
Block a user