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:
0b5861d
)
libs/sys: make sure to always return a table from arptable() when no callback is...
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 24 Apr 2014 21:42:48 +0000
(21:42 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 24 Apr 2014 21:42:48 +0000
(21:42 +0000)
libs/sys/luasrc/sys.lua
patch
|
blob
|
history
diff --git
a/libs/sys/luasrc/sys.lua
b/libs/sys/luasrc/sys.lua
index 66285249fc33e1d2181285c33caa0583e28f88c2..df6280dda091c02a00e2dddd984301fcce19695a 100644
(file)
--- a/
libs/sys/luasrc/sys.lua
+++ b/
libs/sys/luasrc/sys.lua
@@
-233,7
+233,8
@@
net = {}
-- The following fields are defined for arp entry objects:
-- { "IP address", "HW address", "HW type", "Flags", "Mask", "Device" }
function net.arptable(callback)
- local arp, e, r, v
+ local arp = (not callback) and {} or nil
+ local e, r, v
if fs.access("/proc/net/arp") then
for e in io.lines("/proc/net/arp") do
local r = { }, v