_arpcache = {}
_ARPCACHE4 = '/sbin/ip -4 n'
+_PING6 = '/bin/ping6 -c 1 -W 1'
+_ARPCACHE6 = '/sbin/ip -6 n'
function _match_v4(ip)
return string.match(ip,"%d*%.%d*%.%d*%.%d*")
if _match_v4(ip) then
cmd = _ARPCACHE4
else
- return "OK"
+ os.execute(_PING6..' '..ip)
+ cmd = _ARPCACHE6
end
local f = io.popen(cmd)