X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fluci-mod-admin-mini%2Fluasrc%2Fmodel%2Fcbi%2Fmini%2Fdhcp.lua;h=bcc26cd442109347d579bc70de9b1165d577b1d3;hb=28e3b328545529c19429ce88c7d1769e64e2de0f;hp=9a1c1fea4569d3cc68a3217ac1c5fc042dd85e4b;hpb=dd2b05289b40002b2e4c098abfc88052e423215f;p=project%2Fluci.git
diff --git a/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/dhcp.lua b/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/dhcp.lua
index 9a1c1fea4..bcc26cd44 100644
--- a/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/dhcp.lua
+++ b/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/dhcp.lua
@@ -3,7 +3,7 @@
-- Licensed to the public under the Apache License 2.0.
local uci = require "luci.model.uci".cursor()
-local ipc = require "luci.ip"
+local sys = require "luci.sys"
local wa = require "luci.tools.webadmin"
local fs = require "nixio.fs"
@@ -87,12 +87,11 @@ name = s2:option(Value, "name", translate("Hostname"))
mac = s2:option(Value, "mac", translate("MAC-Address"))
ip = s2:option(Value, "ip", translate("IPv4-Address"))
-ipc.neighbors({ family = 4 }, function(n)
- if n.mac and n.dest then
- ip:value(n.dest:string())
- mac:value(n.mac, "%s (%s)" %{ n.mac, n.dest:string() })
+sys.host_hints(function(m, v4, v6, name)
+ if m and v4 then
+ ip:value(v4)
+ mac:value(m, "%s (%s)" %{ m, name or v4 })
end
end)
return m
-