summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-splash
diff options
context:
space:
mode:
authorPaul Oranje <p.oranje@xs4all.nl>2015-05-02 10:44:17 +0200
committerPaul Oranje <p.oranje@xs4all.nl>2015-05-02 10:44:17 +0200
commitae8e971eef2be269beab9465139869055918d878 (patch)
tree5314a2d5b494884271d8900cba6afc348952279b /applications/luci-app-splash
parent4742d1c2112ace9d1299c69fb086c1646bb04911 (diff)
parent36879e9e8658601dc3e86ff9251da3fc3666efe0 (diff)
Merge branch 'master' of https://github.com/openwrt/luci into proto=ipv6+aiccu+fixes
Diffstat (limited to 'applications/luci-app-splash')
-rwxr-xr-xapplications/luci-app-splash/root/usr/sbin/luci-splash13
1 files changed, 10 insertions, 3 deletions
diff --git a/applications/luci-app-splash/root/usr/sbin/luci-splash b/applications/luci-app-splash/root/usr/sbin/luci-splash
index e566e9b508..2870dbe6aa 100755
--- a/applications/luci-app-splash/root/usr/sbin/luci-splash
+++ b/applications/luci-app-splash/root/usr/sbin/luci-splash
@@ -7,6 +7,7 @@ ipc = require "luci.ip"
-- Init state session
local uci = require "luci.model.uci".cursor_state()
+local ipt = require "luci.sys.iptparser".IptParser()
local fs = require "nixio.fs"
local ip = require "luci.ip"
@@ -137,27 +138,33 @@ function ipvalid(ipaddr)
end
function mac_to_ip(mac)
+ local ipaddr = nil
ipc.neighbors({ family = 4 }, function(n)
if n.mac == mac and n.dest then
- return n.dest:string()
+ ipaddr = n.dest:string()
end
end)
+ return ipaddr
end
function mac_to_dev(mac)
+ local dev = nil
ipc.neighbors({ family = 4 }, function(n)
if n.mac == mac and n.dev then
- return n.dev
+ dev = n.dev
end
end)
+ return dev
end
function ip_to_mac(ip)
+ local mac = nil
ipc.neighbors({ family = 4 }, function(n)
if n.mac and n.dest and n.dest:equal(ip) then
- return n.mac
+ mac = n.mac
end
end)
+ return mac
end
function main(argv)