+ local srv
+ local ip = luci.ip.IPv4(client:getpeername())
+ luci.model.uci.foreach("network", "interface",
+ function (section)
+ if section.ipaddr then
+ local net = luci.ip.IPv4(section.ipaddr, section.netmask)
+ if ip and net and net:contains(ip) then
+ srv = section.ipaddr
+ return
+ end
+ end
+ end)
+