From 7a5d15fd090f8bb000cbe8c3febbabd90d8b7fba Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Wed, 9 Mar 2022 18:25:35 -0800 Subject: [PATCH] Tunnel's default IP is explicityly based on eth0's MAC (not 'lan') (#278) --- files/www/cgi-bin/vpn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/www/cgi-bin/vpn b/files/www/cgi-bin/vpn index 05f9d02e..f320a0e1 100755 --- a/files/www/cgi-bin/vpn +++ b/files/www/cgi-bin/vpn @@ -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)