summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-11-27 00:07:17 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-11-27 00:07:17 +0000
commitddccf4732816a64a86d108fa07bf5815673c0680 (patch)
tree66ecb279b6e8fccbd7f4d86c059c33ded2470684
parent838fa54541f300b39f3805c5d22686b45fef5c3f (diff)
libs/sys: fix regexp pattern in routes6()
-rw-r--r--libs/sys/luasrc/sys.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index 4cd012bccd..bc872c9113 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -376,8 +376,10 @@ function net.routes6()
"([a-f0-9]+) ([a-f0-9]+) " ..
"([a-f0-9]+) ([a-f0-9]+) " ..
"([a-f0-9]+) ([a-f0-9]+) " ..
- "(%d+) (%d+) ([^%s]+) +([^%s]+)"
+ "([a-f0-9]+) ([a-f0-9]+) " ..
+ "([^%s]+) +([^%s]+)"
)
+
src_ip = luci.ip.Hex(
src_ip, tonumber(src_prefix, 16),
luci.ip.FAMILY_INET6, false
@@ -397,8 +399,8 @@ function net.routes6()
dst_prefix = dst_ip:prefix(),
nexthop_ip = nexthop:string(),
metric = tonumber(metric, 16),
- refcount = tonumber(refcnt),
- usecount = tonumber(usecnt),
+ refcount = tonumber(refcnt, 16),
+ usecount = tonumber(usecnt, 16),
flags = tonumber(flags), -- hex?
device = dev
}