ARCH:mipsel
Hardware: MT7621
Kernel: 5.10
GCC: 8.4.0
SDK:openwrt master
Problem version: luajit2-20220310
Normal version: luajit2-20220309
Example:
#!/usr/bin/luajit
function ip2int(ip)
local ipnum=0
local n=4
ip:gsub("([0-9]+)", function(i)
n = n - 1
ipnum = ipnum + i*(256^n)
end)
print(ip, ipnum, (ipnum == 4294967040) and "ok" or "error")
end
for i=0,50 do
ip2int("255.255.255.0")
end
ARCH:mipsel Hardware: MT7621 Kernel: 5.10 GCC: 8.4.0 SDK:openwrt master Problem version: luajit2-20220310 Normal version: luajit2-20220309
Example:
Result: