Commit graph

7598 commits

Author SHA1 Message Date
Hannu Nyman
c0e2255ae9 Merge pull request #393 from nmav/no-group-match
luci-app-ocserv: list users with no group
2015-08-31 11:20:29 +03:00
Jo-Philipp Wich
a36a73cbdc Merge pull request #457 from jplitza/master
luci-lib-jsonc: fix handling of strange keys, allow encoding []
2015-08-30 17:57:00 +02:00
Jan-Philipp Litza
e7645d557c luci-lib-jsonc: allow encoding empty lists
To be consistent with the behavior of luci-lib-json, an empty Lua table
should be encoded to an empty JSON list, not an empty JSON object.

To still allow encoding empty JSON objects, the usage of anything other
than a number or a string as a key (for example an empty table or a
function) can be used to force encoding as an object:

    json.stringify({})                  -- "[]"
    json.stringify({[{}] = true})       -- "{}"

Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
2015-08-30 15:52:33 +02:00
Jan-Philipp Litza
e32a877aa4 luci-lib-jsonc: Ignore non-string-or-number keys in tables
Previously, the following caused a segmentation fault:

    json.stringify({[{}] = true})

This was caused by lua_tostring() returning NULL for anything but
strings and numbers, letting json_object_object_add crash.

This patch makes jsonc ignore all keys which have no string
representation altogether.

Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
2015-08-30 15:51:17 +02:00
Hannu Nyman
0d5070c510 statistics: remove references to Lucid from scripts
Both init.d and uci-defaults scripts included in luci-app-statistics
still contained stuff related to lucid, which package was removed by
91b97bc9f6

Changes to scripts:
* init.d: lucid reference removed,
          /var/etc creation moved earlier (before first possible use)
* uci-defaults: lucid parameters & restart removed
  (but busybox httpd stuff was left intact, although it might be unnecessary)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-30 14:00:29 +03:00
hnyman
478bb37a45 Merge pull request #456 from hnyman/stat-config
statistics: cleanup default configuration
2015-08-30 08:57:12 +03:00
Hannu Nyman
e6672f094b luci-app-multiwan: mark broken as it depends on multiwan from oldpackages
Mark luci-app-multiwan @BROKEN, as it depends on the old 'multiwan'
package, located in the deprecated 'oldpackages' feed.

'packages' feed contains both 'mwan3' and 'luci-app-mwan3' apps that
have superseded the old packages.

This should fix #395.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-29 18:04:55 +03:00
Hannu Nyman
4f429c5c8d statistics: adjust default settings to match default plugins
Adjust default settings to match the plugins installed by default
(default plugins: iwinfo, interface, load)

* disable plugins not installed by default to avoid error messages at start
* remove references to Freifunk interfaces, as most users do not have those

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-29 11:15:39 +03:00
Hannu Nyman
6a4226b3d1 statistics: cleanup config file
No functional changes, but the file is reorganised:
* group settings: general settings / output plugins / input plugins
* sort settings inside a group
* remove quotes from option names to match the current uci behaviour
* whitespace corrections

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-29 10:59:01 +03:00
Hannu Nyman
5ce647746e statistics: clarify CPU/processor graph by removing "idle" from it
Clarify the CPU time consumption graph by removing the "idle" data from it.
Especially with light traffic, removing "idle" enables the graph
to scale better and to properly show the CPU load variations.

If "idle" data needs to be seen, it might be added as a second graph below.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-28 22:58:16 +03:00
Hannu Nyman
0141494935 statistics: clarify stats introduction
* Clarify the short explanation on the statistics section's front page.
* Mention the possibility of additional collectd plugins to get more stats.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-28 22:48:03 +03:00
Hannu Nyman
11a9f757b1 Remove ancient INSTALL file and update README.me
Remove the outdated INSTALL file from Kamikaze period,
as README.md contains the updated information.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-28 18:38:41 +03:00
Jo-Philipp Wich
0ecd6974a8 Merge pull request #454 from hnyman/fix-entropy
statistics: entropy plugin - fix placement of entropy.lua
2015-08-28 12:06:25 +02:00
Hannu Nyman
d820ed4882 statistics: entropy plugin - fix placement of entropy.lua
Move the file entropy.lua to the correct directory.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-28 12:51:43 +03:00
Christian Schoenebeck
c48fbfa992 Merge pull request #451 from hnyman/fw-zone-len
luci-app-firewall: validate zone name to enforce fw3 max. length
2015-08-28 11:19:45 +02:00
Christian Schoenebeck
89763f901e Merge pull request #452 from hnyman/entropy
statistics: Add support for entropy stats
2015-08-28 11:19:00 +02:00
Hannu Nyman
7df0df48c0 statistics: Add support for entropy stats
Add statistics on the available entropy.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-27 10:19:38 +03:00
Hannu Nyman
34e875b3d3 firewall: validate max length of zone name
fw3 sets the maximum length of the zone name to 14 and
ignores zone definitions with too long names.
http://nbd.name/gitweb.cgi?p=firewall3.git;a=blob;f=zones.h;hb=HEAD#l25
http://nbd.name/gitweb.cgi?p=firewall3.git;a=blob;f=zones.c;hb=HEAD#l195

Add a simple validation to ensure that the new zone name is short enough.
This should fix issue #345

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-26 13:55:26 +03:00
Christian Schoenebeck
084d435060 Merge pull request #448 from hnyman/cpulabel
statistics: cpu graph - add label definitions, add softirq and interrupt stats
2015-08-24 09:49:54 +02:00
Christian Schoenebeck
5f3dadeb8d Merge pull request #450 from hnyman/stat-memory
statistics: support better autoscaling in rrdtool, improve memory graph's y-axis
2015-08-24 09:49:11 +02:00
Hannu Nyman
9a06498dbd statistics: memory plugin - improve graph by better scaling of y-axis
Utilise alt_autoscale_max to make the memory chart y-axis to scale better
for devices with e.g. 128 MB RAM.

Also fix the axis min value to 0.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-23 21:12:56 +03:00
Hannu Nyman
86ff4bd3a4 statistics: support rrdtool's alt_autoscale and alt_autoscale_max options
Implement support for alternative scaling of the y-axis.
By default, rrdtool will autoscale to 1,2,5,10,20,50,100,200,... etc.,
which is not always suitable (e.g. memory charts for device with 128 MB).

Rrdtool 1.0.50 already supports alternative autoscaling that creates
a tighter y-axis. Implement graph-level options in Luci statistics to
support those boolean options as "alt_autoscale" and "alt_autoscale_max".

info at http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-23 21:02:14 +03:00
Hannu Nyman
962cd2c4c1 statistics: cpu graph - add label definitions, add softirq and interrupt stats
CPU plugin in the Luci statistics was missing the label definitions,
so the field labels are like "cpu_system" instead of "System".
Add proper label definitions to CPU (like the other plugins already have).

The statistics graph was also missing softirq and interrupt stats, although colors
for them were defined. Softirq consumes massive amount of CPU especially with
any qos in use, so it is important for the user to see also that data. Add both
softirq and interrupt stats to the graph.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-23 17:14:22 +03:00
Manuel Munz
37f6bd557d Merge pull request #447 from srdjanrosic/patch-1
Enable setting --script-security in client mode.
2015-08-23 10:33:12 +02:00
Srdjan Rosic
82fecb7709 Enable setting --script-security in client mode.
This is useful in client mode as well, since it allows one to use --route-noexec and --up <cmd> or --route-up <cmd> to create routes manually instead of relying on whatever routes vpn server pushes down to the client.
  mode=server dependency in luci was introduced together with script_security by mmunz back in 2011.with no explanation in the commit why mode=server was there.
2015-08-22 09:27:25 +01:00
Jo-Philipp Wich
8597b86ebf Merge pull request #444 from hnyman/fixconntrack
statistics: fix conntrack and ping regression caused by collectd changes
2015-08-19 10:08:42 +02:00
Hannu Nyman
b7b6ed740b statistics: fix ping graph label regression
Earlier update to collectd 5.4.1 changed the field from "ping" to "value",
which was changed in the graph definition here, but the label definition
was forgotten. Field's label now reads "ping_IPaddr_value".

Correct the label definition to show only IPaddr like the other two graphs.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-19 10:56:30 +03:00
Hannu Nyman
ff9da6cb76 statistics: fix conntrack regression caused by collectd 5.5.0
Collectd 5.5.0 introduced new data to conntrack plugin:
In addition to the number of tracked connections there is also
the static max conntrack value and the calculated use percentage.

Luci's conntrack plugin intrepretes "conntrack-max" as a new data instance
and includes it in the graph in addition to the real "conntrack" number.

Eliminate "max" from graph by specifying empty "" instance as data source.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-18 23:05:00 +03:00
Karl Palsson
2a77918b02 http.protocol: Support filehandlers for unhandled encodings
The setfilehandler() functions used for mime and url encoded message
bodies all operate with a signature of fh(meta, chunk, eof), but for
unhandled encodings, the callback was directly assigned to the sink
function, which has a signature of snk(chunk).  Insert a wrapper to
properly generate the EOF flag, and include a stub "meta" block
providing a virtual "name" and also the original client provided
Content-Type header, to possibly help with taking alternative actions in
the file handler.

The sink function created for raw content decoding also used the wrong
signature for the sink function.

Signed-off-by: Karl Palsson <karlp@remake.is>
2015-08-18 17:52:48 +02:00
Christian Schoenebeck
c42bd54abb Merge pull request #441 from hnyman/tz2015f
Timezone information: update to 2015f
2015-08-18 09:50:17 +02:00
Hannu Nyman
d63a7cb582 Timezone information: update to 2015f
Changes in 2015e and 2015f:
http://mm.icann.org/pipermail/tz-announce/2015-June/000032.html
http://mm.icann.org/pipermail/tz-announce/2015-August/000033.html

     Morocco will suspend DST from 2015-06-14 03:00 through 2015-07-19 02:00,
     not 06-13 and 07-18 as we had guessed.

     Assume Cayman Islands will observe DST starting next year, using US rules.
     Although it isn't guaranteed, it is the most likely.

     North Korea switches to +0830 on 2015-08-15.
     The abbreviation remains "KST".

     Uruguay no longer observes DST.

     Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-17 22:53:11 +03:00
Christian Schoenebeck
bb7ea3ea04 Merge pull request #433 from chris5560/master
ipkg.lua: compare_versions() Replace Lua Math Library call
2015-08-04 21:19:35 +02:00
Christian Schoenebeck
0be846d7ff ipkg.lua: compare_versions() Replace Lua Math Library call
function compare_versions(): replace Lua Math Library call with if clause

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-08-04 21:14:48 +02:00
Christian Schoenebeck
afc5d67207 Merge pull request #431 from chris5560/master
cbi.lua: Fix Flag.parse() to set "self.section.changed"
2015-08-04 11:05:23 +02:00
Christian Schoenebeck
237740b386 cbi.lua: Fix Flag.parse() to set "self.section.changed"
Add to set "self.section.changed" on changes like other values do.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-08-02 07:06:42 +02:00
Christian Schoenebeck
fa88550215 Merge pull request #429 from chris5560/master
ipkg.lua: new function compare_version()
2015-08-01 16:17:11 +02:00
Jo-Philipp Wich
376f038726 luci-lib-nixio: pass exact sockaddr length to getnameinfo()
Musl libc requires the length parameter of getnameinfo() to be exactly
`sizeof(struct sockaddr_in)` or `sizeof(struct sockaddr_in6)`, depending on
the passed sockaddr family.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-07-30 22:38:36 +02:00
Manuel Munz
69ecfff002 contrib/community-profiles: add hameln 2015-07-30 16:44:44 +02:00
Christian Schoenebeck
305528b3cc ipkg.lua: new function compare_version
* minor fix function _list() set to local
* new function compare_version() lua version of opkg compare-version

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-07-27 18:08:54 +02:00
Georgi Valkov
ec170d6282 Fix: A disabled wireless network may be shown as enabled, when multiple networks are defined on the same radio. 2015-07-27 11:37:09 +02:00
Georgi Valkov
159b60f449 Fix: Status for disabled wireless networks may display the SSID, BSSID and Mode of an active network on the same radio. 2015-07-27 11:37:09 +02:00
Georgi Valkov
0110494b18 When editing an AP wireless network in LuCI, if one or more STA networks are also present on the same radio, then the channel is locked and cannot be changed for the AP. The case when all STA networks are disabled is not considered. This patch fixes the issue. Disabled networks no longer apply a lock on the channel. 2015-07-27 11:37:09 +02:00
Georgi Valkov
48c8cad48a Workaround: saved administration site user and pass may appear on the Wireless configuration page, replacing the WPA key. 2015-07-27 11:37:09 +02:00
Christian Schoenebeck
77acfe0b46 Merge pull request #428 from aa65535/master
luci-app-shadowsocks-libev: update package
2015-07-24 09:54:17 +02:00
Jian Chang
966d87b79b luci-app-shadowsocks-libev: update package
support for shadowsocks-libev v2.2.3

Signed-off-by: Jian Chang <aa65535@live.com>
2015-07-23 00:52:27 +08:00
Jo-Philipp Wich
3610f3222d luci-mod-rpc: move luci config require into the authentication function (#427)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-07-15 23:28:16 +02:00
Jo-Philipp Wich
16047d03c5 luci-mod-rpc: add missing luci config require
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-07-15 22:30:45 +02:00
Lars Kruse
e7f57e0caf Add luci support for dnsmasq option '--servers-file'
Signed-off-by: Lars Kruse <lists@sumpfralle.de>
2015-07-14 23:32:08 +02:00
Christian Schoenebeck
17ab7acbec Merge pull request #426 from mamarley/vnstatunderscorefix
luci-app-vnstat: Fix blank graphs for iface names with underscores
2015-07-12 18:50:06 +02:00
Michael Marley
b1b0ba5ba9 luci-app-vnstat: Fix blank graphs for iface names with underscores
The regex used to process the iface query string argument in
vnstat.htm was stripping underscores, which caused the graph not to
display for interfaces with names containing underscores.  This
patch adds the underscore to that regex so that the interface name
will be correct and the graph will be displayed.

Signed-off-by: Michael Marley <michael@michaelmarley.com>
2015-07-12 11:45:23 -04:00