Tunnel's default IP is explicityly based on eth0's MAC (not 'lan') (#278)

This commit is contained in:
Tim Wilkinson 2022-03-09 18:25:35 -08:00 committed by GitHub
parent 36c3e054ac
commit 7a5d15fd09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ end
function get_server_network_address()
local server_net = cursor:get("vtun", "@network[0]", "start")
if not server_net then
local mac = aredn.hardware.get_interface_mac(aredn.hardware.get_iface_name("lan"))
local mac = aredn.hardware.get_interface_mac("eth0")
local a, b = mac:match("^..:..:..:..:(..):(..)$")
server_net = "172.31." .. tonumber(b, 16) .. "." .. ((tonumber(a, 16) * 4) % 256)
cursor:set("vtun", "@network[0]", "start", server_net)