summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-splash
diff options
context:
space:
mode:
authorManuel Munz <munz@comuno.net>2015-02-20 14:20:55 +0100
committerManuel Munz <munz@comuno.net>2015-02-20 14:20:55 +0100
commit9cac3f4ec1b95b32c57a837df10ea55a136726f4 (patch)
tree6f5d35bd871b89826fe0e54256ce2fcd10b39a89 /applications/luci-app-splash
parent47603a37ed581303d8a5241f6cd39433918a1b96 (diff)
applications/luci-splash: fix fac02283137f6ff59363695bb07a3f9cec58e577 | ipt module was missing and the new functions didn't return anything
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 e566e9b50..2870dbe6a 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)