Commit Graph

46 Commits

Author SHA1 Message Date
Matthias Schiffer 4019293e85
gluon-respondd: remove obsolete migration from upgrade script (#2350)
announced was renamed to respondd in 2016. Let's remove the obsolete
migration code.
2021-12-25 11:42:57 +01:00
Matthias Schiffer f419db58a2 Set PKG_VERSION in gluon.mk
This removes PKG_VERSION and PKG_RELEASE from most Makefiles, as the
value was never useful for Gluon packages; instead, PKG_VERSION is set
to 1 in gluon.mk.

It also removes two other weird definitions:

- gluon-iptables-clamp-mss-to-pmtu replicating the old PKG_VERSION logic
  from gluon-core, but without the fixed PKG_BUILD_DIR to prevent
  unnessary rebuilds
- gluon-hoodselector set GLUON_VERSION=3
2021-10-07 23:42:38 +02:00
Matthias Schiffer 17123aa420
gluon-respondd: fix count_stations() arguments
Fixes warnings about implicit pointer-to-int and int-to-pointer casts.

Fixes: 59a4cd63b8 ("gluon-respondd: expose OWE clients in nodeinfo")
2021-01-12 04:32:23 +01:00
David Bauer 5b068d7c47
treewide: rename local_client zone (#2115)
This renames the local_client zone to loc_client, as local_clint exceeds
the maximum zone length allowed for firewall3, which is 11 bytes.

This worked previously due to firewall3 using unsafe string operations.
Now creation of the chain fails (latest OpenWrt master).
2020-09-13 05:24:33 +02:00
Jan-Tarek Butt 22847e4986
gluon-reload: add missing service restarts on domain switching
[Matthias Schiffer: fix up start/stop order and file permissions]
2020-05-28 23:30:25 +02:00
lemoer b9c1a026b1
gluon-respondd: emit "primary_domain_code" in nodeinfo
Closes #1974

Situation:
==========

$ ls -l /lib/gluon/domains/lindennord.json
lrwxrwxrwx    1 root     root            10 Jan  6 03:42 /lib/gluon/domains/lindennord.json -> dom17.json

Before:
=======

$ gluon-neighbour-info -d ::1 -p 1001 -r nodeinfo -c 1
{
   "node_id": "525400123456",
   "system": {
     "domain_code": "lindennord",
     "site_code": "ffh"
   },
...
}

After:
======

$ gluon-neighbour-info -d ::1 -p 1001 -r nodeinfo -c 1
{
   "node_id": "525400123456",
   "system": {
     "primary_domain_code": "dom17",
     "domain_code": "lindennord",
     "site_code": "ffh"
   },
...
}
2020-05-21 18:09:05 +02:00
Martin Weinelt 3fb4cdad13 gluon-respondd: allow queries from extra_prefix6
Fixes #1959
2020-04-04 22:13:10 +02:00
David Bauer 59a4cd63b8 gluon-respondd: expose OWE clients in nodeinfo
Provide the number of OWE stations in addition to the number of all
connected wireless clients.
2020-04-01 01:15:38 +02:00
Matthias Schiffer 0f1fa243f7
Move common code from gluon-mesh-babel and -batman-adv respondd providers to gluon-respondd
In addition this PR contains:
- split of gluon-respondd provider into multiple source files
- minor additional cleanups in gluon-mesh-babel respondd provider
  (untested, as the babel respondd provider already doesn't compile prior
  to these changes...)
2019-11-24 12:04:58 +01:00
Matthias Schiffer 4ee5f3590b
gluon-respondd: fix format string type mismatches 2019-11-23 18:56:44 +01:00
Tata e81d1a390f Add mechanism to reload domain related services (#1710) 2019-04-23 17:34:49 +02:00
Matthias Schiffer 59a44274cb
gluon-respondd: do not join link-local multicast group on br-client
Fixes #1701
2019-04-21 19:31:32 +02:00
David Bauer 44c70ca4d6 gluon-respondd: expose MemAvailable 2018-08-25 00:57:44 +02:00
lemoer 73c30b0916 gluon-respondd: fix whitespace after "if" 2018-05-05 15:09:30 +02:00
lemoer dde708692c gluon-respondd: use %SCNu64 instead of %llu for uint64_t 2018-05-05 15:09:30 +02:00
lemoer 6ac7e97fae gluon-respondd: add information from /proc/stat to "statistics"
This commit adds information about:
- how cpu time is spent since boot in jiffies (1/100*sek) (cpu)
    - the value is summed for all cores, so in 10 seconds the
      summed values will increase by 4000, if the cpu has
      4 cores
- context switches since boot (ctxt)
- interrupt counters since boot (intr, softirq)
- forks since boot (processes)

    { "stat": {
       "cpu": {
         "user": 219403,
         "nice": 1714,
         "system": 75159,
         "idle": 2727739,
         "iowait": 2943,
         "irq": 0,
         "softirq": 571
       },
       "intr": 8426340,
       "ctxt": 50992590,
       "processes": 10549,
       "softirq": 5161884
    } }
2018-05-05 15:09:30 +02:00
Matthias Schiffer 994c94918a
treewide: automatically set SECTION and CATEGORY for Gluon packages 2018-04-14 00:01:04 +02:00
Matthias Schiffer 5e086da608
gluon-respondd: remove Gluon-specific provider directory
Our provider modules are prefixed with gluon- now, and the log message
about a missing provider dir was confusing users.
2018-03-08 21:46:05 +01:00
Matthias Schiffer 60522ee253
treewide: move package Makefile boilerplate to gluon.mk 2018-03-08 19:49:41 +01:00
Matthias Schiffer 934221b86f
treewide: remove redundant definitions from package Makefiles 2018-03-07 21:23:41 +01:00
lemoer 2ef0af5fe8
gluon-respondd: add system.domain_code to respondd provider "nodeinfo"
[Matthias Schiffer: rebase]
2018-01-26 12:32:47 +01:00
Christof Schulze bc2fb8cc69 gluon-respondd: firewall should allow access for devices in zone local_client (#1291) 2017-12-31 19:57:57 +01:00
Christof Schulze 910a6c8bb3 gluon-respondd: add current unix time to statistics (#1287) 2017-12-29 23:49:28 +01:00
Christof Schulze e5b4d25451
gluon-respondd: allow access to respondd from mesh-internal addresses 2017-11-25 23:31:08 +01:00
Christof Schulze 1c1c9f8fc7
gluon-core: firewall rework, make base policy more restrictive
* gluon-core, gluon-client-bridge: introduce new firewall zone: local_client
 * gluon-core: put clients in local_client zone, introduce drop-zone,
   set dns-rules and zones
 * gluon-respondd: allow respondd on mesh
 * gluon-status-page-api: allow http input on mesh and client
2017-11-25 23:19:08 +01:00
lemoer 4899dda4af treewide: check for NULL after uci_alloc_context() (#1224) 2017-09-21 20:56:40 +02:00
Matthias Schiffer afdae86a5e
gluon-respondd: allow platforminfo_get_model() to return NULL 2017-02-12 06:04:22 +01:00
Matthias Schiffer f9a52fd54f
Move luci-base dependency from gluon-core to gluon-setup-mode
Nothing outside the config mode depends on luci-base anymore.
2017-02-10 02:10:02 +01:00
Matthias Schiffer 6cf03bab37
treewide: replace normal uses of luci.model.uci with simple-uci to reduce LuCI dependencies
We also make use of the boolean support of simple-uci to make scripts
clearer.
2017-02-10 02:10:01 +01:00
Christof Schulze 718758f0e5 gluon-respondd: have respondd join ff05::... in addition to ff02::... (#1030)
Rework init script to additionally join a ff05::... multicast group on the mesh-wide interface.
2017-02-10 02:03:04 +01:00
Matthias Schiffer 2dd8a700ca
package: avoid use of GLUONDIR variable 2017-01-17 21:22:58 +01:00
Matthias Schiffer cd4753aaa5
gluon-respondd: add /usr/lib/respondd to provider directories 2016-12-23 00:44:20 +01:00
Matthias Schiffer 9a06a98651
gluon-respondd: add delay to mesh-wide multicast requests
Mesh-wide multicast requests are answered with a random delay of up to 10s.
2016-12-11 00:42:41 +01:00
Jan-Philipp Litza fcf3abd9c4 gluon-respondd: restart on state change of client iface
Because we unconditionally appended `-i br-client` to the command line of
respondd, it wasn't restarted when br-client changed state. Now, we use a
jsonfilter expression on the network.interface dump data, similar to how the
other interface names are generated, and only add the interface to the argument
list if it is up.
2016-12-09 10:43:24 +01:00
Jan-Philipp Litza d8bb97831b gluon-respondd: Use procd in initscript and to restart on network changes 2016-12-08 23:30:57 +01:00
Matthias Schiffer cb86fce29f
gluon-respondd: make setup.d script executable 2016-12-08 23:02:23 +01:00
Christof Schulze ca57cdfe77 gluon-respondd: make initialisation mesh protocol agnostic (#946) 2016-12-08 17:44:29 +01:00
Matthias Schiffer 7e0075584d
Use a "pretty" hostname where possible
Fixes #414
2016-08-27 16:33:37 +02:00
Jan-Tarek Butt 1c1f490527
Minify all Lua code 2016-07-10 20:14:25 +02:00
Jan-Philipp Litza f7eda9381f respondd modules: Use proper formatting of doubles
Most doubles that are delivered via respondd have limited input
precision, but are converted with up to 17 digits of precision. That can
cause ugly blowups like 0.2800000000000001 in the output, which is
avoided by specifying better format strings (like "%.2f" in most cases).
2016-05-26 17:38:36 +02:00
Matthias Schiffer 4658afb2c6 gluon-core: commit all UCI configs at the end
Avoid commiting configs inbetween to decrease number of flash writes.

Fixes #714.
2016-04-02 18:56:45 +02:00
Matthias Schiffer 19242f4deb Remove all uses of batman-adv-visdata
Should be redundant after 0bd0df6f93
2016-02-08 20:58:28 +01:00
Matthias Schiffer 2f499dbfc1 gluon-respondd: restrict queries from the mesh to link-local addresses
Restrict to link-local addresses to prevent amplification attacks from
outside the mesh, or such attacks affecting the outside world.

Fixes #637
2016-02-05 17:06:07 +01:00
Matthias Schiffer 0005b3b5a2 autoupdater: stop non-essential services before downloading the image 2016-02-02 09:22:50 +01:00
Matthias Schiffer b4aaf8a1f8 gluon-respondd: add init script
Instead of starting gluon-respondd from a hotplug handler, add a proper
init script. The new init script has a restart_if_running argument which
is now used by the hotplug handler.
2016-02-02 09:18:13 +01:00
Matthias Schiffer 9004028cb4 Convert gluon-announce Lua code to C modules, rename to gluon-respondd
gluon-announced and gluon-announce are merged to gluon-respondd.
2016-02-02 09:18:12 +01:00