Skip to content
Snippets Groups Projects
Commit b842ec43 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by Martin Weinelt
Browse files

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