From 6a02931893ff7ecabf1f48597f783a18ebab92cd Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 8 Mar 2010 00:49:39 +0000 Subject: libs/sys: workaround for Lua number overflow in ipv6 route metrics --- libs/sys/luasrc/sys.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libs') 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 -- cgit v1.2.3