diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-03-08 00:49:39 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-03-08 00:49:39 +0000 |
commit | 6a02931893ff7ecabf1f48597f783a18ebab92cd (patch) | |
tree | 984df09e2792dae20da5159ed2b83bfb9ceab6a8 /libs/sys | |
parent | 59b3711e704bac69101b1192782f4fa76db3dcdb (diff) |
libs/sys: workaround for Lua number overflow in ipv6 route metrics
Diffstat (limited to 'libs/sys')
-rw-r--r-- | libs/sys/luasrc/sys.lua | 6 |
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 |