Commit Graph

49 Commits

Author SHA1 Message Date
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
4a60e5a02a
gluon-mesh-vpn-fastd: add missing iptables dependency confusing Kconfig
This was causing "recursive dependency" errors and potentially broken
configurations.
2016-05-18 01:24:11 +02:00
lemoer
c73a12e0ea Change MAC schema generation (#715)
While ath9k/ath10k devices can supprt VIFs with any combination of MAC addresses, there are also adapters which have a hardware MAC filter which only allows a few bits to differ. This commit changes the addresses of all VIFs to ony differ in the last 3 bits, which is required to support many Ralink/Mediatek based WLAN adapters.

Technically, the new addresses are generated by calculating an MD5 hash of the primary MAC address and using a part of this hash as a prefix for the MAC addresses.

The addresses (BSSIDs) of the AP VIFs are also reused for the LAN and WAN interfaces in mesh-on-LAN/WAN mode to reduce the number of needed addresses, and thus reduce the chance of collisions. This is not a problem as the MAC addresses of the AP VIFs are never used except as BSSID, and thus not seen by routing protocols like batman-adv.

Fixes #648

[Matthias Schiffer: rewrote commit message]
2016-04-27 12:16:39 +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
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
Matthias Schiffer
5ecb8a7366 gluon-mesh-vpn-fastd: gluon-annouced: fix fastd status always being reported as enabled 2015-12-08 22:47:32 +01:00
Matthias Schiffer
26682b24b3 Replace gluon-simple-tc by non-Gluon-specific simple-tc
The Gluon-specific functions of the gluon-simple-tc package are moved to
gluon-mesh-vpn-fastd.
2015-10-15 02:38:47 +02:00
Matthias Schiffer
05f146f817 Validate section names from site.conf in various packages 2015-10-11 19:34:14 +02:00
Matthias Schiffer
faba9efb88 Merge branch 'jsonc-sink' of https://github.com/FreifunkBremen/gluon 2015-09-04 17:15:58 +02:00
Jan-Philipp Litza
961e6cc1c0 Add sink support to luci-lib-jsonc and use it where needed 2015-09-04 12:27:45 +02:00
Jan-Philipp Litza
339a6c9959 Remove dependencies on luci.util (and partly nixio.fs) from announce scripts 2015-09-02 13:17:59 +02:00
Jan-Philipp Litza
15a80aaffd Switch from luci-lib-json to luci-lib-jsonc
Apart from replacing a patch for the former by two patches for latter,
this involved minimal adaptations of the lua scripts in the following
packages:

* gluon-announce
* gluon-announced
* gluon-mesh-batman-adv-core
* gluon-status-page
2015-08-30 21:05:13 +02:00
Matthias Schiffer
a50cce4e09 gluon-mesh-vpn-fastd: make adding or removing the null method survive updates (if desired) 2015-05-04 03:09:07 +02:00
Matthias Schiffer
00c47f2912 gluon-mesh-vpn-fastd: extend site configuration to allow multiple and nested peer groups 2015-04-30 13:05:15 +02:00
Matthias Schiffer
5aa6838828 Introduce virtual packages for gluon-setup-mode and gluon-config-mode-core
This will require site.mk to explicitly pull in the gluon-setup-mode and
gluon-config-mode-core packages.
2015-04-26 13:16:23 +02:00
Nils Schneider
db1fddb0c6 gluon-mesh-vpn-fastd: announce peer status using statistics.d
This adds basic peer statistics to statistics.d:

    "mesh_vpn": {
      "muehlentor": {
        "established": 23.8 // seconds
      },
      "huextertor": null,
      "holstentor": null
    }
2015-02-05 21:33:36 +01:00
Matthias Schiffer
9b172bbaf4 Move all upgrade scripts to a common directory
Moving the scripts to a common directory not only vastly simplifies the
zzz-gluon-upgrade script, but also allows to define an ordering of such
scripts across packages.
2015-01-24 11:27:47 +01:00
Matthias Schiffer
ecfcb4dd6b gluon-mesh-vpn-fastd: get rid of initial script 2015-01-24 11:14:09 +01:00
Matthias Schiffer
5ee5cf3ec1 gluon-mesh-vpn-fastd: configure a status socket 2014-11-17 03:23:36 +01:00
Matthias Schiffer
f9cc73187f gluon-mesh-vpn-fastd: use delete_all instead of foreach to delete the old peers 2014-09-15 21:50:43 +02:00
Matthias Schiffer
b51e1063b7 Add utility function to generate unique MAC addresses derived from the primary MAC 2014-09-15 19:55:09 +02:00
Nils Schneider
4e19df098a mesh-vpn-fastd: enable from site.conf
This patch allows fastd's enabled flag's default value to be set from
site.conf.
2014-09-03 20:37:17 +02:00
Matthias Schiffer
f3ff07b1a5 gluon-mesh-vpn-fastd: delete all old backbone peers on update 2014-08-16 14:51:18 +02:00
Nils Schneider
2f5705b5de config-mode, mesh-vpn: refactor key generation
Previously, the config-mode was responsible for generating the fastd
secret. This patch sets the default secret to "generate" causing a
secret to be generated on its first use (e.g. show_key or start).

This also changes the info page (in Expert Mode) to show "n/a" when the
public key is not yet available.
2014-07-27 16:22:40 +02:00
Nils Schneider
0a3bf70d56 split announce.d into nodeinfo + statistics 2014-07-20 14:00:10 +02:00
Matthias Schiffer
e9376fc3bd gluon-mesh-vpn-fastd: use gluon-wan-dnsmasq 2014-07-20 04:03:43 +02:00
Matthias Schiffer
eae6c25de6 Add support for IPv6 mesh VPN connections
The support is still very limited (IPv6-only DNS on WAN doesn't work yet), and
we now need fastd running as root, but apart from that, is should work.
2014-07-11 16:57:28 +02:00
Nils Schneider
318e9d1a1d gluon-announce: detach announce.d from alfred
All announce.d scripts have been moved to /lib/gluon/announce/announce.d
The script /lib/gluon/announce/announce.lua will collect all information
and output json.
2014-07-11 14:43:47 +02:00
Matthias Schiffer
1c0429ce8f gluon-core: extend user management library and convert it to Lua 2014-07-07 21:48:35 +02:00
Matthias Schiffer
ffd86668fe Validate site.conf 2014-07-05 02:48:56 +02:00
Matthias Schiffer
bc54f80dfd gluon-alfred: reduce usage of util.exec, improve table formatting 2014-06-10 15:44:35 +02:00
Matthias Schiffer
48ea4b711f gluon-alfred: split announce.lua into several files and move parts into the appropriate packages
This also fixes the type of a few fields which were strings instead of numbers.
2014-06-09 19:23:16 +02:00
Matthias Schiffer
4d9df6d253 gluon-mesh-vpn-fastd: replace config script generator with Lua script 2014-05-17 13:43:08 +02:00
Matthias Schiffer
2454c8abb7 Add gluon-legacy package with legacy upgrade scripts 2014-02-22 08:27:51 +01:00
Matthias Schiffer
cc1af68caa Don't use site config in compile step 2014-02-06 19:57:39 +01:00
Matthias Schiffer
5bb4cf4e3a gluon-mesh-vpn-fastd: always use wan DNS servers to resolve the peers 2014-01-25 03:20:03 +01:00
Matthias Schiffer
72b27ea2e0 gluon-mesh-vpn-fastd: enable secure handshakes 2014-01-14 19:37:15 +01:00
Matthias Schiffer
5241565a79 gluon-mesh-vpn-fastd: don't run as root 2014-01-14 18:46:17 +01:00
Matthias Schiffer
d204b0e24f Remove initscript enable/disable hacks
Better configure these properly.
2014-01-13 18:29:00 +01:00
Matthias Schiffer
2e155f9d09 gluon-mesh-vpn-fastd: enable no_rebroadcast on the VPN interface 2014-01-13 01:03:08 +01:00
Matthias Schiffer
1be0a7667f Make package version depend on the site config version where necessary 2014-01-04 09:19:13 +01:00
Matthias Schiffer
6729bf37ef gluon-mesh-vpn-fastd: clean up configuration script 2013-10-03 18:41:45 +02:00
Matthias Schiffer
e73f79f392 Move some more configuration into the corrent packages, correctly configure multiple radios 2013-10-03 18:04:03 +02:00
Matthias Schiffer
f22f0e44f6 gluon-mesh-vpn-fastd: always enable fastd 2013-10-02 20:33:32 +02:00
Nils Schneider
61a384f214 Revert "gluon-mesh-vpn-fastd: set mesh_vpn.enabled flag"
This reverts commit baf6d14160ab15069f68161d0d1556c369cf0cbd.
2013-10-02 14:02:24 +02:00
Nils Schneider
09855e0c80 gluon-mesh-vpn-fastd: set mesh_vpn.enabled flag 2013-10-02 13:19:39 +02:00
Matthias Schiffer
fdf19830d7 gluon-mesh-vpn-fastd: generate fastd config from site configuration 2013-09-30 21:29:52 +02:00
Matthias Schiffer
6f41a9b7bf Add stub setup script so the package is not empty 2013-02-11 21:48:36 +01:00
Matthias Schiffer
0637c9fa6d More makefiles for some basic packages 2013-01-31 11:36:18 +01:00