projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
838fa54
)
libs/sys: fix regexp pattern in routes6()
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 27 Nov 2008 00:07:17 +0000
(
00:07
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 27 Nov 2008 00:07:17 +0000
(
00:07
+0000)
libs/sys/luasrc/sys.lua
patch
|
blob
|
history
diff --git
a/libs/sys/luasrc/sys.lua
b/libs/sys/luasrc/sys.lua
index
4cd012b
..
bc872c9
100644
(file)
--- 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]+) " ..
"([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
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),
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
}
flags = tonumber(flags), -- hex?
device = dev
}