From: Jo-Philipp Wich Date: Mon, 8 Mar 2010 00:49:39 +0000 (+0000) Subject: libs/sys: workaround for Lua number overflow in ipv6 route metrics X-Git-Tag: 0.10.0~841 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=6a02931893ff7ecabf1f48597f783a18ebab92cd libs/sys: workaround for Lua number overflow in ipv6 route metrics --- diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index d9fe5ab25..f30a2b679 100644 --- a/libs/sys/luasrc/sys.lua +++ b/libs/sys/luasrc/sys.lua @@ -463,7 +463,11 @@ function net.routes6(callback) refcount = tonumber(refcnt, 16), usecount = tonumber(usecnt, 16), flags = tonumber(flags, 16), - device = dev + device = dev, + + -- lua number is too small for storing the metric + -- add a metric_raw field with the original content + metric_raw = metric } if callback then