summaryrefslogtreecommitdiffhomepage
path: root/libs/sys
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-03-08 00:49:39 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-03-08 00:49:39 +0000
commit6a02931893ff7ecabf1f48597f783a18ebab92cd (patch)
tree984df09e2792dae20da5159ed2b83bfb9ceab6a8 /libs/sys
parent59b3711e704bac69101b1192782f4fa76db3dcdb (diff)
libs/sys: workaround for Lua number overflow in ipv6 route metrics
Diffstat (limited to 'libs/sys')
-rw-r--r--libs/sys/luasrc/sys.lua6
1 files changed, 5 insertions, 1 deletions
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