applications/luci-splash: add missing insmod for act_police, fix a crash in cli util
This commit is contained in:
parent
21de97b235
commit
6fa65fa9ec
2 changed files with 5 additions and 4 deletions
|
@ -179,6 +179,7 @@ start() {
|
||||||
|
|
||||||
### Load required modules
|
### Load required modules
|
||||||
[ "$LIMIT_UP" -gt 0 -a "$LIMIT_DOWN" -gt 0 ] && {
|
[ "$LIMIT_UP" -gt 0 -a "$LIMIT_DOWN" -gt 0 ] && {
|
||||||
|
silent insmod act_police
|
||||||
silent insmod cls_fw
|
silent insmod cls_fw
|
||||||
silent insmod cls_u32
|
silent insmod cls_u32
|
||||||
silent insmod sch_htb
|
silent insmod sch_htb
|
||||||
|
|
|
@ -380,7 +380,7 @@ function list()
|
||||||
-- Get current arp cache
|
-- Get current arp cache
|
||||||
local arpcache = { }
|
local arpcache = { }
|
||||||
for _, entry in ipairs(net.arptable()) do
|
for _, entry in ipairs(net.arptable()) do
|
||||||
arpcache[entry["HW address"]:lower()] = { entry["Device"], entry["IP address"] }
|
arpcache[entry["HW address"]:lower()] = { entry["Device"]:lower(), entry["IP address"]:lower() }
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Find traffic usage
|
-- Find traffic usage
|
||||||
|
@ -410,7 +410,7 @@ function list()
|
||||||
if s[".type"] == "lease" and s.mac then
|
if s[".type"] == "lease" and s.mac then
|
||||||
local ti, to = traffic(s)
|
local ti, to = traffic(s)
|
||||||
local mac = s.mac:lower()
|
local mac = s.mac:lower()
|
||||||
local arp = arpcache[mac]:lower()
|
local arp = arpcache[mac]
|
||||||
print(string.format(
|
print(string.format(
|
||||||
"%-17s %-15s %-9s %3dm %-7s %7dKB %7dKB",
|
"%-17s %-15s %-9s %3dm %-7s %7dKB %7dKB",
|
||||||
mac, s.ipaddr, "leased",
|
mac, s.ipaddr, "leased",
|
||||||
|
@ -429,8 +429,8 @@ function list()
|
||||||
local arp = arpcache[mac]
|
local arp = arpcache[mac]
|
||||||
print(string.format(
|
print(string.format(
|
||||||
"%-17s %-15s %-9s %4s %-7s %9s %9s",
|
"%-17s %-15s %-9s %4s %-7s %9s %9s",
|
||||||
mac, arp and arp[2]:lower() or "?", s[".type"],
|
mac, arp and arp[2] or "?", s[".type"],
|
||||||
"- ", arp and arp[1]:lower() or "?", "-", "-"
|
"- ", arp and arp[1] or "?", "-", "-"
|
||||||
))
|
))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue