Skip to content

Commit

Permalink
gluon-mesh-batman-adv: do not override WAN MAC address with VXLAN
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
neocturne committed May 8, 2020
1 parent c90b400 commit 071d8b1
Showing 1 changed file with 6 additions and 1 deletion.
@@ -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')

0 comments on commit 071d8b1

Please sign in to comment.