if action then
-- Check whitelist
if whitelist then
- local ipnum = task:get_from_ip_num()
+ local ipnum = task:get_from_ip():to_number()
if ipnum and whitelist:get_key(ipnum) then
-- Address is whitelisted
return
local ip = task:get_from_ip()
if ip then
if whitelist then
- local ipnum = task:get_from_ip_num()
+ local ipnum = task:get_from_ip():to_number()
if whitelist:get_key(ipnum) then
-- Address is whitelisted
return
task:insert_result(rule['symbol'], 1)
end
else
- local ip = task:get_from_ip_num()
+ local ip = task:get_from_ip():to_number()
if ip and rule['ips'] and rule['ips']:get_key(ip) then
task:insert_result(rule['symbol'], 1)
end
local function check_whitelist (task)
if symbol_ip then
-- check client's ip
- local ipn = task:get_from_ip_num()
+ local ipn = task:get_from_ip():to_number()
if ipn then
local key = r:get_key(ipn)
if key then