Commit Graph

982 Commits

Author SHA1 Message Date
Fabian Bläse f895796b39 gre: Disable Host Dependency
A tunnel cannot be set up, if the peer configured is unreachable for the
route when the tunnel is set up, because adding host dependency fails.

As already stated when this dependency was disabled for wireguard, it
seems to be somehow broken for IPv6 peers as well.

Because it is not necessary for us anyway, host dependency is disabled
for gre with this patch.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2018-12-31 01:00:14 +01:00
Fabian Bläse 1164f443cf fff-dhcp: Always announce as default router
Set ra_default to '2' to announce as default-router, even if no default
route or global addresses are present.

This is necessary to be able to reach addresses in fc00::/7 from
clients, because odhcpd does not support sending out routes to clients
via router advertisements.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2018-12-30 16:15:25 +01:00
Fabian Bläse e32d2b046c wireguard: Add fwmark and rules to ensure tunnel only runs over wan.
When no default route was present in the table main, but only in table
fff because of disconnected WAN, wireguard was digging it's tunnel
through fff-network.

Depending on the metrics, the gateway therefore used the tunnel as
default-route which let the tunnel collapse.

By introducing fwmark and routing it seperately, this can be avoided.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2018-12-29 22:07:13 +01:00
Robert Langhammer c9c5e40cbe Use $iface to set uci babeld.$name.ifname 2018-12-29 18:41:33 +01:00
Fabian Bläse bd514dc00e Move all sysupgrade.conf changes to fff-sysupgrade
This keeps gateway specific changes, even if updating from node firmware.

Because this file wasn't cleared anywhere, it got longer with every
upgrade. This is now fixed by reverting to the upstream behaviour
(truncate instead of append)

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2018-12-29 18:32:04 +01:00
Fabian Bläse ec7e93cf4b wireguard: Disable Endpoint Host Dependency
When using IPv6 addresses (or DNS which has AAAA record) as endpoint,
add_host_dependency fails for some reason which causes the wireguard
interface to disappear.

Because it is not necessary for us anyway, host_dependency is disabled
for wireguard with this patch.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2018-12-29 17:56:11 +01:00
Fabian Bläse d055900079 Improve rxcost aquisition
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2018-12-28 15:14:28 +01:00
Matthias Weidler 5cad7a4c4d Add rxcost to gateway config 2018-12-28 15:06:44 +01:00
Fabian Bläse 265f1e37eb Add support for Ubiquiti EdgeRouter X 2018-12-28 15:06:44 +01:00
Fabian Bläse 1d2b9268ef Add support for Archer C60 v1/v2
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2018-12-28 15:06:44 +01:00
Fabian Bläse 75ceb1545d Fix another call to function with changed interface since rebase 2018-12-28 15:05:59 +01:00
Fabian Bläse c22c85338d configuregateway: reload_config on config change 2018-12-28 15:05:59 +01:00
Fabian Bläse 28f5b8e760 Reenable forwarding 2018-12-28 15:05:59 +01:00
Fabian Bläse e6abd1aa57 Fix call to function with changed interface since rebase 2018-12-28 15:05:59 +01:00
Fabian Bläse 674b9fab00 Use common location for manual hoodfile, copy hoodfile to webserver location 2018-12-28 15:05:59 +01:00
Fabian Bläse 846f4b3504 Add fff-macnock to layer3 variant 2018-12-28 15:05:59 +01:00
Fabian Bläse 0b0958492c Block FORWARD in fff-firewall, not in fff-network
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2018-12-28 15:05:59 +01:00
Fabian Bläse c189544711 improve tcp performance over multiple wifi hops by enabling tcp timestamps 2018-12-28 15:05:59 +01:00
Fabian Bläse 5d917bdbc9 Add kmod for NAT 2018-12-28 15:05:59 +01:00
Fabian Bläse 1cbe0d9d40 Add fff-gateway package for gateway configuration 2018-12-28 15:05:59 +01:00
Tim Niemeyer 4652019567 Nodewatcher: add babels 2018-12-28 15:05:58 +01:00
Fabian Bläse 6d09527e04 fff-network: tolerate different ip6addrs 2018-12-28 15:05:58 +01:00
Fabian Bläse e528b04c19 Remove uradvd dependency from fff-network 2018-12-28 15:05:58 +01:00
Fabian Bläse 8aae47c3eb Add CPUPORT to device configs 2018-12-28 15:05:58 +01:00
Fabian Bläse 6d4419d0e0 Add wireguard 2018-12-28 15:05:58 +01:00
Fabian Bläse 1e47bf68e4 Remove commits from wireless function 2018-12-28 15:05:58 +01:00
Fabian Bläse 68cc170d62 Add fff-odhcpd package 2018-12-28 15:05:58 +01:00
Fabian Bläse ee401147bf Add packages for various debugging tools 2018-12-28 15:05:58 +01:00
Tim Niemeyer e29016e111 packages/fff: add batman-adv server packages
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2018-12-28 15:05:58 +01:00
Tim Niemeyer 564a383b8b packages/fff: add new fff-babeld package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2018-12-28 15:05:58 +01:00
Tim Niemeyer 0ae1c44427 buildscript: support to choose the build variant
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2018-12-28 15:04:31 +01:00
Tim Niemeyer ec571795c4 packages/fff: add layer3 variant
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2018-12-28 15:04:31 +01:00
Tim Niemeyer 65010073d4 packages/fff: add new fff-dhcp package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2018-12-28 15:04:31 +01:00
Steffen Pankratz 4542425c5e 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
2018-12-28 15:04:31 +01:00
Steffen Pankratz 4d372cd3b1 packages/alfred-json: added package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
- Changed subject
2018-12-28 15:04:31 +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