Commit Graph

976 Commits

Author SHA1 Message Date
Tim Niemeyer f0eae4fff4 buildscript: support to choose the build variant
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-02-05 14:29:31 +01:00
Tim Niemeyer 5074c6b08f packages/fff: add layer3 variant
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-02-05 14:29:20 +01:00
Tim Niemeyer 609269f3a4 alfred-json: compile fix
This fixes:
Makefile:27: *** missing separator.  Stop.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-02-03 03:05:52 +01:00
Adrian Schmutzler 277e90061c OpenWrt: Bump openwrt, packages and routing to v18.06.2
Refresh patches.

This introduces backported BATMAN fixes up to v2019.0.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-03 03:05:29 +01:00
Fabian Bläse 2fdebf6c93 sysctl: Enable tcp timestamps for improved tcp performance
tcp timestamps can improve tcp performance a lot, especially
with unstable networks like wifi.

Linux default behaviour is enabled so the tcp timestamps setting
is removed from sysctl configuration.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-31 19:29:33 +01:00
Fabian Bläse 30818f0ab1 packages/fff: Add fff-ra package
This Package adds a router advertisement daemon and
appropriate Freifunk Franken specific configuration for it.

The ra_default option is set to '2' to force the default flag,
even if no default route for ipv6 is present.
This is necessary, because otherwise fc00::/7 targets would be
unreachable, since odhcpd is unable to send specific routes inside a RA.
This won't affect clients ability to reach hosts which have a dual stack
connection, typical network stacks prefer IPv4 over IPv6 ULA when no
public IPv6 address is available.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-01-29 22:25:27 +01:00
Fabian Bläse 24925dee3b fff-dhcp: Remove incorrectly placed RA configuration
Configuration of Router Advertisements is done in a seperate package.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-01-29 22:25:11 +01:00
Adrian Schmutzler 3ab75a084b Add support for TP-Link CPE210 v3
This device is still in PR state in OpenWrt, since ar71xx target
is deprecated and thus lacking reviewers.
It worked nicely for me anyway, so I include the current state of
the PR (has not changed for months).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-01-29 22:24:17 +01:00
Adrian Schmutzler 8f322c253a Add support for TP-Link CPE210 v2
With our dynamic resetting of WiFi interfaces, the rssileds
of OpenWrt do not work correctly. This disables them as a
workaround, since they otherwise create about 20 % CPU load.

Since the MACH file for all CPE210/510 is the same, no adjustment
of the OpenWrt-tiny patch is needed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-01-29 22:23:46 +01:00
Adrian Schmutzler d0d6f5335f Add support for Archer C60 v1
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-01-29 00:57:33 +01:00
Adrian Schmutzler 5f357277b1 bsp: Reorder ar71xx files
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-01-29 00:57:11 +01:00
Adrian Schmutzler 428304da07 (fff-)alfred: Add dependency in monitoring-proxy and alfred-json
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-01-29 00:56:35 +01:00
Adrian Schmutzler b969eff22c fff-alfred-monitoring-proxy: Remove dependency from nodewatcher
The proxy only sends data from alfred master to the Monitoring.
It does not require the device to produce alfred-data in the
nodewatcher itself.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-01-29 00:52:31 +01:00
Adrian Schmutzler dc6d77610f wget: Remove -t from calls
The wget from busybox we are using ignores the -t option,
although it does not throw errors in the currently used version.

However, specifying the -t option in calls where it is not used
is misleading, so it should be removed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-29 00:50:32 +01:00
Tim Niemeyer 23a81ffb9a packages/fff: add new fff-babeld package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
- Convert configuration to uci
- Split IPv4 network rules to fff specific subnets
- Add IPv6 ULA network rules
- Change PKG_VERSION to single number versioning
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
- Removed "delete batman-adv.bat0"

Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-01-28 13:10:40 +01:00
Adrian Schmutzler 0a63717ab1 alfred-monitoring-proxy: Improve curl call
This improves the curl call by:
- Using full executable path
- Removing redundant -X POST
- Using --data-binary instead of --data

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-01-27 22:50:15 +01:00
Adrian Schmutzler 4d55ef39f3 alfred-monitoring-proxy: Switch to alfred2
By using the alfred2 mechanism of the Monitoring, we get rid
of the embracing {"64":...} key-value construct.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-01-27 22:50:04 +01:00
Adrian Schmutzler 7e8ac80dee alfred-json: Remove inapplicable lines from Makefile
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-01-27 22:48:09 +01:00
Adrian Schmutzler 518dc56145 packages: Harmonize indent
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-01-27 22:46:50 +01:00
Andreas Düring f21eb6b4bd README: Remove section title and move children up a level
Section title is removed because it doesn't seem to make much sense there.

Signed-off-by: Andreas Düring <gh@duering-andreas.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-27 15:38:38 +01:00
Andreas Düring 6202b2c67e README: Apply grammar and spell fixes
Signed-off-by: Andreas Düring <gh@duering-andreas.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-27 15:38:38 +01:00
Andreas Düring 44f3cdb54f README: Add links to Freifunk website
Signed-off-by: Andreas Düring <gh@duering-andreas.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-27 15:38:38 +01:00
Andreas Düring 644ae9a908 README: Reorder sections in buildscript description
to reflect the order in which you would call the commands.

Signed-off-by: Andreas Düring <gh@duering-andreas.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-27 15:38:38 +01:00
Andreas Düring e7b4a96bfc README: Add section regarding custom images
Signed-off-by: Andreas Düring <gh@duering-andreas.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-27 15:38:38 +01:00
Andreas Düring 5fb0ff2e1d README: Fix documentation of target image copying
Signed-off-by: Andreas Düring <gh@duering-andreas.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-27 15:38:38 +01:00
Andreas Düring 57629e87fe README: Remove outdated commands
Remove mentions of "selectcommunity" command and community file.
Start removing mentions of bsp which is not available.
Fix buildscript commands (there is no kernel config).

Signed-off-by: Andreas Düring <gh@duering-andreas.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-27 15:38:38 +01:00
Steffen Pankratz 9b5d3f1aeb fff-alfred-monitoring-proxy: add package
CC: kratz00@gmx.de
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
- Changed subject
- Changed curl parameters
- Added firewall rule
- Configure alfred to be master
- Add fff-nodewatcher as dep, because we use the alfred config
- Change data handling during curl to pipe
- Add newline on cron rule
Signed-off-by: Fabian Bläse <fabian@blaese.de>
- Fix alfred master mode introduced by packaging alfred
- Adjust monitoring-proxy waittime to suggestion
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-01-27 15:38:38 +01:00
Steffen Pankratz 3206c0c1c7 packages/alfred-json: added package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
- Changed subject
- Move alfred-json to own repo
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Robert Langhammer <rlanghammer@web.de>
2019-01-27 15:38:38 +01:00
Tim Niemeyer f40ff9468f packages/fff: add new fff-dhcp package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
- configure router advertisements
- fix package title
- remove unnecessary dhcp config on first boot
- lower lease time
- only commit dhcp uci section
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-01-19 22:50:38 +01:00
Christian Dresel f8269102a5 fff-hoods: firewall fe80::1 from Client to Batman and Node
This firewall blocks all communication with fe80::1 from a
Client to Batman and to the Node.

We need this because some crap devices (e.g. a wrongly
connected router on a clientport) have fe80::1 as address
and break our setup.

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-12-09 14:31:09 +01:00
Fabian Bläse cb0420e2d3 configurehood: Don't offer hoodfile when using local hoodfile
When using local hoodfile neither this nor central hoodfile
downloaded earlier should be offered to neighbours, so remove it
from the webroot.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2018-12-09 14:29:00 +01:00
Fabian Bläse 1da800bfce configurehood: Copy local hoodfile to common location
Instead of overwriting local variable to local hoodfile location,
copy it to the commonly used location. This makes the local hoodfile
behave exactly like central hoodfiles, which prevents some border cases.

The previous behaviour mainly caused issues when using getJsonPath() and
getUpgradePath() from fff-hoodutils.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2018-12-09 14:28:08 +01:00
Christian Dresel 9999b7b2cb fff-sysupgrade: merge SOC and SUBTARGET
This make it easier to use new targets without subtarget.

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-12-09 14:27:30 +01:00
Adrian Schmutzler 83a70ed5a9 fff-batman-adv: Enable bridge loop avoidance (BLA)
Based on the documentation, BLA will only help if two nodes
are connected via WiFi AND via Ethernet cable on CLIENT ports!
For a "correct" setup, e.g. WiFi and BATMAN port connection,
BLA won't have an effect.

Since the former case is possible and there are no known
drawbacks, we enable BLA.

This removes the line to disable BLA, so it will be enabled as
B.A.T.M.A.N. enables it by default.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-12-05 19:30:03 +01:00
Adrian Schmutzler 433b9e4510 show_info: Add VPN peer lists for fastd/L2TP
This shows the configured peers for fastd and L2TP.
Note that "configured" does not tell whether they are working.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2018-12-05 19:29:46 +01:00
Adrian Schmutzler 9576ee7786 show_info: Add hoodid
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2018-12-05 19:29:29 +01:00
Fabian Bläse 87bbed1306 Remove USB support for tl-mr3020
USB support is removed because of very limited flash.
This allows building for tl-mr3020 again.

USB support has no known use case for this firmware.
Most usb devices would require additional drivers anyway.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-12-02 13:56:13 +01:00
Fabian Bläse b66f04012b Disable 802.11b rates using OpenWRT option
Instead of manually overwriting basic and supported rates,
this patch makes use of a new OpenWRT option "legacy_rates",
which disables 802.11b data rates.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-11-27 23:35:15 +01:00
Adrian Schmutzler ef00054916 configurehood/nodewatcher: Also process hood ID in addition to name
So far, the Monitoring evaluates hoods based on their names.

This introduces several problems, most prominently a hood
re-creation if it is renamed at the KeyXchange.

Since we have unique hood IDs in the KeyXchange and the
Monitoring retrieves those via hoods.php, it is logical use this
information instead of relying on string comparison.

This requires the hood files to contain an additional field "id".
While this has not been implemented, the changes in this patch
will still work and just write empty data to the uci field and
alfred data.

For local hoods, the "id" in the hood file will remain unset.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-11-27 23:20:13 +01:00
Fabian Bläse 665377ab68 network: set router solicitations to default value
When setting up a node, router solicitations can be used to speed
up receiving router advertisements a lot. This mechanism has been
previously disabled by our custom sysctl config.

However because linux does not send router solicitations, if it
doesn't accept router advertisements, which is disabled for every
link except WAN, this option can safely be set to it's default value
for all interfaces.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-11-27 23:19:42 +01:00
Adrian Schmutzler 0a05b15d43 nodewatcher: Change default name to be replaced back to OpenWrt
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-11-21 15:31:42 +01:00
Adrian Schmutzler a37dedda26 Always send hood to Monitoring
Since the MacNocker was introduced, the hood information in
UCI is DELETED if the hood is lost.

If the router still successfully sends alfred data in this state,
the Monitoring will treat it as a V1 device. This is annoying,
especially since it looks like a loop.

An easy solution is to send an empty <hood> field in those cases,
as V2 routers are detected by them knowing their hood.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-11-21 15:31:15 +01:00
Robert Langhammer eed0705407 Remove batman option no_rebroadcast
This sysfs option no longer exists.

The no_rebroadcast option was used as part of gluon’s
batman-adv-legacy implementation, after open-mesh decided
to not include it into batman-adv v14:

https://patchwork.open-mesh.org/patch/3434/

Our firmware has included (and enabled) it since December 2013.

With the upgrade to batman-adv v15 (pulled from openwrt-routing
then) in October 2017, the custom patch was no longer included.
It looks like open-mesh provides an equivalent built-in
solution now:

https://git.open-mesh.org/batman-adv.git/commit/a00797d8fa8fd1471e8be1ac23d506f76d866aaa

Thus, the option can be removed.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-11-12 11:47:58 +01:00
Fabian Bläse 672e7a2f9b fastd: Allow IPv6 remotes for peers
The "ipv4" option is used to enforce using ipv4 when
using dns for fastd remotes.
However this option was incorrectly always set which
makes ipv6 connections impossible.
Because enforcing ipv4 is not necessary, this option
is removed.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Fabian Bläse <fabian@blaese.de>
2018-11-12 11:47:07 +01:00
Adrian Schmutzler e1b9280f12 nodewatcher: Prevent multiple instances at the same time
This is based on the configurehood-Patch from Tim Niemeyer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-11-07 15:29:00 +01:00
Adrian Schmutzler e5d3335c72 configurehood: Prevent multiple instances at the same time
This is based on a similar patch from Tim Niemeyer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-11-07 15:28:36 +01:00
Adrian Schmutzler 2f7e8a18d8 configurehood: Introduce random delays to dilute requests
Instead of having 1000 routers accessing the KeyXchange in the
same second, this will dilute the request within a period of
15 seconds.

Same is done for queries from gateways.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-10-31 17:37:47 +01:00
Adrian Schmutzler 14622e20c2 fff-network: Make CLIENT default status for one-/two-port devices
The V2 firmware requires initialization of the WiFi interfaces
by a hood file. If a one-port (or two-port) device is isolated,
it won't get this information from other WiFi nodes (w2sta mode).

In addition, it cannot be connected to the internet, as this would
require the port to be in WAN mode. It is also not possible to
connect a client device for configuration, since WiFi is not
configured and the LAN port is in BATMAN mode.

To enable configuration of an isolated one-port/two-port device,
this patch thus changes the default port config to CLIENT, so
the user can choose the desired configuration more easily.

For two-port, we will have one port WAN and the second port
CLIENT.

Fixes #110

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Harald Thuemmler <int@bnhof.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-10-25 16:34:59 +02:00
Adrian Schmutzler 3856fff4be fff-sysupgrade: Fix comparison for version in sysupgrade.sh
The previous version seemed to work only for numeric data.

Fixes #113

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-10-25 16:34:20 +02:00
Adrian Schmutzler dc4746eae9 fff-hoods: Do not run configurehood and nodewatcher at the same time
nodewatcher and configurehood have both been run with */5 in micrond.

This may lead to nodewatcher accessing information just being
changed by configurehood. To prevent this, we just change the
start of configurehood, as this has no known disadvantages.

A change of the nodewatcher start would also solve the problem,
but nodewatcher is synchronized to the alfred-master and the
Monitoring.

Fixes #96.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-10-25 16:33:47 +02:00