summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash/root/usr
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-08 12:26:45 +0000
committerSteven Barth <steven@midlink.org>2008-08-08 12:26:45 +0000
commite080fcebd2396c138d8c916d1cf385a88e0db246 (patch)
tree9a41e995a438d8ac32c9501f44800bf3d0e7d297 /applications/luci-splash/root/usr
parentf4ec942d1bc3d9a6c822c075017cb2949cd8fff5 (diff)
libs/core: Cleaned up luci.sys in favor of the new luci.ip module
Diffstat (limited to 'applications/luci-splash/root/usr')
-rwxr-xr-xapplications/luci-splash/root/usr/bin/luci-splashd8
1 files changed, 4 insertions, 4 deletions
diff --git a/applications/luci-splash/root/usr/bin/luci-splashd b/applications/luci-splash/root/usr/bin/luci-splashd
index 5551ba6847..e8c275209e 100755
--- a/applications/luci-splash/root/usr/bin/luci-splashd
+++ b/applications/luci-splash/root/usr/bin/luci-splashd
@@ -1,7 +1,7 @@
#!/usr/bin/lua
require("socket")
-require("luci.sys")
+require("luci.ip")
require("luci.model.uci")
luci.model.uci.set_savedir(luci.model.uci.savedir_state)
@@ -14,13 +14,13 @@ while true do
if client then
client:settimeout(1)
- local ip = client:getpeername()
local srv
+ local ip = luci.ip.IPv4(client:getpeername())
luci.model.uci.foreach("network", "interface",
function (section)
if section.ipaddr then
- local p = luci.sys.net.mask4prefix(section.netmask)
- if luci.sys.net.belongs(ip, section.ipaddr, p) then
+ local net = luci.ip.IPv4(section.ipaddr, section.netmask)
+ if ip and net and net:contains(ip) then
srv = section.ipaddr
return
end