Commit Graph

526 Commits

Author SHA1 Message Date
Robert Langhammer d989f435e6 fff-network: Have WAN sysctl commands executing after global ones
On layer3 variant ("gateway firmware"), 60-fff-gateway.conf
changes "forwarding" for all interfaces, overwriting the
changes from 51-fff-network-$iface.conf.

By putting the WAN-specific commands after 60-fff-gateway.conf
this patch should provide the correct device-specific value
for WAN interface now.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[Rephrased commit title and added message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-10-07 16:20:35 +02:00
Fabian Bläse cac9b55aa2 nodewatcher: Send babeld version
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-10-07 14:44:10 +02:00
Fabian Bläse 199058d110 babeld: Automatically add redistribute filters
babeld filters routes before announcing them with the
redistribute filters.

Users might add unknown public subnets to the client interface,
so redistribute filters have to be generated for these addresses.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2019-09-30 10:38:16 +02:00
Fabian Bläse c3f8b808ec fff-gateway: Add sanity checks
This adds two checks:
- Does gateway config exist?
- Does gateway config version match?

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-09-29 21:29:25 +02:00
Fabian Bläse 40e1577a50 configuregateway: Print newlines for improved readabilty
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-09-29 21:27:07 +02:00
Fabian Bläse 6fdc930301 Add support for Ubiquiti EdgeRouter X (SFP)
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-09-29 21:18:11 +02:00
Fabian Bläse d8ea5c652f fff-gateway: Add firewall rules to ensure nothing is forwarded onto WAN
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-09-29 21:14:17 +02:00
Fabian Bläse 6c706432a6 Create fff-node package
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-09-29 21:13:54 +02:00
Fabian Bläse d7737beb8c Rename variant meta-packages to avoid confilcts
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-09-29 21:13:20 +02:00
Adrian Schmutzler 004b386d55 nodewatcher: Remove leftover use of batman-adv sysfs
In d9ec8edb15 ("batman-adv: Move from DEBUGFS to batctl") we
switched from deprecated DEBUGFS to batctl.

Despite debugfs, batctl seems to also have deprecated sysfs
(https://www.open-mesh.org/news/90).

This patch thus replaces a reference to iface_status by the
corresponding batctl command.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-08-21 18:16:09 +02:00
Alexander Gutzeit ca40d2d766 fff-wireguard: rename keys to remote_public_key/local_private_key
This renames two options for wireguard interfaces in
/etc/config/gateway:
public_key -> remote_public_key
private_key -> local_private_key

Signed-off-by: Alexander Gutzeit <alexander.gutzeit@web.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[adjusted commit message/title, added version bump, remove
rename for network config]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-08-21 18:14:30 +02:00
Robert Langhammer 854ba40568 package/fff: add ip-full to variant layer3
"ip" is one of the most essential tools on a gateway. At the moment
there is only one dependency to the metapackage ip from the nodewatcher,
which pulls ip-tiny. Dropping the nodewatcher causes a fallback to the
busybox built-in ip-command.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[fabian@blaese.de: rebase onto master]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-08-14 00:38:29 +02:00
Fabian Bläse 2978cbeb4e Add fff-wireguard package
This package adds gateway.d scripts which create
peering interfaces using wireguard.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-08-14 00:33:07 +02:00
Fabian Bläse 104a260843 fff-babeld: Add prefix to configuration name
When the user removes a peer from /etc/config/gateway,
the script has to be able to find any leftover configurations
that have been created for it.

This can be made very easy by prepending a prefix to every
automatically generated configuration.

This also allows to remove the nasty check for the babeld default interface.
Therefore the naming check for cfg* also can be removed.

As a side effect all manually created configuration blocks that do not match a
prefix will not be touched by configuregateway.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-08-14 00:32:44 +02:00
Fabian Bläse 53ff6f631b fff-babeld: Move common babeld procedures into functions
Various things have to be done for every interface on
which babeld shall run.

Those procedures are moved into functions to reduce duplicate code.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-08-14 00:32:18 +02:00
Adrian Schmutzler fbc7dab6de fff-support: Add device name and firmware version to MOTD
This adds a line containing the device name and the current
firmware version to the MOTD shown after logging in via SSH, e.g.

> TP-Link TL-WR1043N/ND v2 @ jubtl9_20190320

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-22 22:47:51 +02:00
Adrian Schmutzler 4d5731341b configurehood: Do not suppress uci errors where not necessary
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-22 22:36:38 +02:00
Adrian Schmutzler 3d9eb1db2e fff-hoods/fff-wireless: Reconfigure instead of delete and create
Previously, when configurehood switched status, all WiFi devices
were completely rewritten and all interfaces were deleted and
recreated. This is both unnecessary and ugly.

This patch redesigns WiFi setup to create all interfaces (in
parallel) initially, and then only to enable/disable them as
necessary. Where reconfiguration is necessary, only the variable
parts are changed.

Since most of the wifi-device config is already created by
OpenWrt, this builds based on the existing wifi-devices and
only removes the default wifi-ifaces.

This patch will not change the logic (codeflow) of configurehood,
but only affects how action on the WiFi devices/interfaces is
taken.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-22 22:34:56 +02:00
Adrian Schmutzler 8a1eb6d4c8 fff-wireless: Also use wXmesh label for wXibss
The two different names "wXmesh" and "wXibss" have no functional
purpose and are just for indication. Remove this distinction, so
mesh is just mesh.

This will make further adjustment easier and clearer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-22 22:33:33 +02:00
Adrian Schmutzler 99d7a95d04 fff-tunneldigger/tunneldigger: Remove packages
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-06 13:59:58 +02:00
Adrian Schmutzler b38578aded show_info: Remove L2TP diagnostics
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-06 13:59:12 +02:00
Robert Langhammer 5a119dcda8 fff-nodewatcher: remove l2tp
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[Bump PKG_RELEASE and SCRIPT_VERSION]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-06 13:58:57 +02:00
Robert Langhammer cc59852570 fff-web: remove l2tp
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[Bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-06 13:58:48 +02:00
Robert Langhammer 4941d6eff5 fff-vpn-select: remove tunneldigger
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[Rebased, updated PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-06 13:58:13 +02:00
Adrian Schmutzler 0889cf35d8 packages/fff: Tidy up wget dependencies
The symbols BUSYBOX_CONFIG_WGET and
BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT are set in different
packages and do not correlate with where Busybox wget is
actually used.

This updates packages dependencies based on the current
situation.

Note that with current firmware, both two versions of wget
are installed:
/bin/wget
/usr/bin/wget

The latter is from busybox and is used as the default version.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-01 23:04:21 +02:00
Adrian Schmutzler e9268539d1 packages/fff: Only use PKG_RELEASE for our own packages
PKG_VERSION is meant to refer to the version of external packages,
as we do e.g. in the tunneldigger package.

For our own packages, we just need the PKG_RELEASE variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[Rebased onto current state of master]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-01 21:54:09 +02:00
Adrian Schmutzler 26b3a13b7c alfred-json: Set PKG_VERSION to latest official version
Although this tag is very old, this is how PKG_VERSION is meant
to be used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-01 21:37:23 +02:00
Fabian Bläse 3b746e022e Add support for TP-Link Archer C7 v5
Signed-off-by: Fabian Bläse <fabian@blaese.de>
[freifunk@adrianschmutzler.de: Added Portorder]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-22 21:55:17 +02:00
Fabian Bläse 2f359a3e00 fff-babel: add configuration scripts
This adds a configuration script to allow configuration
of babel with configuregateway.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-06-22 21:25:18 +02:00
Adrian Schmutzler 06bf24f639 fff-batman-adv-legacy: Remove unused package
This hasn't been used since it was replaced. Remove it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-06-15 12:46:50 +02:00
Fabian Bläse 275c4b255c fff-dhcp: Add configuration scripts for dns
Because DNS Forwarding is done by dnsmasq which we configure
inside the fff-dhcp package, the configuration scripts for dns
are placed in this package.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-06-15 12:45:28 +02:00
Adrian Schmutzler 02fae91477 fff-macnock: Add dependency from tc
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-06-15 12:32:22 +02:00
Fabian Bläse 29d5a10153 gateway.d: Remove output from meta script
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 18:17:18 +02:00
Fabian Bläse 656102999a packages/fff: Only use fff-batman-adv for node-variant
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 18:16:47 +02:00
Fabian Bläse 07b6a6eb3a packages/fff: layer3-variant: Add useful debugging tools
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 18:16:37 +02:00
Fabian Bläse 4fb9c4c652 fff-sysupgrade: Add gateway config to sysupgrade.conf
User configuration for layer3 firmware is stored in
/etc/config/gateway. To preserve this file across updates it
is added to sysupgrade.conf

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 18:16:23 +02:00
Fabian Bläse b652825b7a packages/fff: Use fff-gateway package when compiling layer3 firmware
fff-gateway is mandatory when compiling layer3 firmware.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 18:16:18 +02:00
Adrian Schmutzler 1fef2e4117 fff-wireless: Raise MTU for 802.11s mesh to 1560
This will prevent batman-adv packet fragmentation on 802.11s mesh.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 17:23:32 +02:00
Adrian Schmutzler fe9c5919e6 fff-network: Remove MTU 1528 from ethmesh device
This interface was using 1500 anyway and setting ethernet to
MTU > 1500 might not be a good idea.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langammer <rlanghammer@web.de>
2019-05-31 17:22:52 +02:00
Adrian Schmutzler 9c5b65a770 configuregateway: Only match "function" in subshell
When running OpenWrt master, "type <functionname>" only returns
"<functionname> is a function". Thus, to make the implementation
future-proof and since it is also working with the current state,
change the grep in execute_subshell to match "function".

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 17:21:10 +02:00
Adrian Schmutzler dbd8607b53 upgrade.html: Rename uploaded firmware before sysupgrade
At the moment sysupgrade via WebUI is broken on many devices.
This is reproducible: While the (few) status messages seem
normal, the device boots again with the old firmware.
Sysupgrade via SSH always works.

The sysupgrade call in upgrade.html directly uses the path of
the uploaded firmware file as argument. From several tests and
based on caught stdout/stderr from this line, it looks like haserl
deletes the uploaded firmware file due to a hidden trigger before
or even while it is processed by sysupgrade.

The easiest way to work around that is to just rename the file
before using it as argument to sysupgrade. This will preserve the
file DURING sysupgrade. If sysupgrade fails explicitly (status
code != 0), remove the file to provide sufficient memory for
another upload.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 17:18:18 +02:00
Fabian Bläse 590dbca7a9 gateway.d: Add scripts for network configuration
This adds scripts to configure vlan and client network.
This also adds sysctl settings to enable forwarding.

Note:
Devices specific properties are sourced from fff-network package.
This creates a dependency on fff-boardname and fff-network.
These properties should be located elsewhere in the future.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-25 19:26:00 +02:00
Adrian Schmutzler 555e91628b fff-network: Provide script with CPUPORT
This provides the CPUPORT which is needed for the gateway firmware.
The script is supposed to be sourced.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-05-25 19:22:49 +02:00
Fabian Bläse d687823a27 gateway.d: Add configuration script for meta information
This adds a configuration script for applying hostname,
coordinates, hoodname and contact address.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-05-09 11:03:32 +02:00
Fabian Bläse b40c45b69c fff-gateway: add package
This introduces a new script for simple gateway configuration.

The main configuregateway script is able to execute functions
for various steps like 'configure' or 'apply' from scripts in /etc/gateway.d.

This makes it easy to distribute configuration to the appropriate packages.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-05-09 11:03:13 +02:00
Adrian Schmutzler d9371a7a22 configurehood: Leverage -H option for batctl
Since batctl can suppress headers, we do not have to count lines.

Cosmetical change.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-04-15 15:54:41 +02:00
Adrian Schmutzler 518c0d6fef fff-sysupgrade/fff-web: Free cache before upgrade
This might reduce the chance to break devices with 32 MB RAM
during sysupgrade.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-04-15 15:54:18 +02:00
Adrian Schmutzler d9ec8edb15 batman-adv: Move from DEBUGFS to batctl
The debug filesystem will be deprecated and disabled by default
in newer versions of B.A.T.M.A.N.

This patch switches our code to the batctl, as recommended.

Since batctl can suppress headers, this actually makes our life
easier ...

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-03-27 18:24:29 +01:00
Adrian Schmutzler 95a22327fe fff-base: Fix another indent
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-02-10 22:45:46 +01:00
Adrian Schmutzler d0d8fc57af configurenetwork: Tidy-up auto configuration functions
This fixes a typo in description and introduces a single variable
for the sysctlfile.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-02-10 22:44:26 +01:00
Adrian Schmutzler e34f5b0119 build: Remove "squashfs" from image names
This is just meant to make image names shorter.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-02-10 22:44:06 +01:00
Adrian Schmutzler e6c469ec3c tunneldigger: Fix indentation for conffile in Makefile
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-05 14:29:31 +01:00
Adrian Schmutzler fa2ead9306 packages/fff: Use tabs in Makefiles
Currently, Makefile use a mixture of tabs and spaces with various
indents. This harmonizes all Makefiles to use tab indentation only.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-05 14:29:31 +01:00
Adrian Schmutzler 3db6e99928 fff-base: Do not manually select fff-vpn-select
Since we went on to the KeyXchangeV2, fff-vpn-select is a pure
subpackage/utility of fff-hoods. Thus, we should not manually
select it, but have it selected indirectly by fff-hoods.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-05 14:29:31 +01:00
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
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 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
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 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
Tim Niemeyer dc18e22a29 fff-sysupgrade: Update sysupgrade.sh to support openwrt-18.06
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[Set PKG_RELEASE back to 1]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-10-24 18:33:41 +02:00
Adrian Schmutzler f6a457fd5e fff-firewall: Fix match in ip6tables and add dependencies
The syntax " -m state --state " seems to be not supported anymore.

The replace should not change behavior compared to
lede-17.01-based firmware.

Added required dependency.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-10-24 18:04:52 +02:00
Adrian Schmutzler aaccc17496 fff-boardname: Fix changed board name of WDR4900v1
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-10-24 18:04:38 +02:00
Robert Langhammer 18e4263c6a Remove unusual shebang in files to be sourced.
Fixes: #101

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-09-17 12:38:38 +02:00
Adrian Schmutzler 1e5f4f1319 fff-wireless: Provide device-specific WiFi settings and set TX power
Like the network.* files, this introduces wifi.* files to set
device-specific settings.

In contrast to the former, the wifi.* settings are only run during
firstboot and only if there is a file present.

In this patch, we set the antenna gain values for the devices not
treated correctly in OpenWRT.

Side conditions:
- The script requires 50-fff-boardname and 60-fff-wireless
  beforehand, so I chose 62 as number.
- The wifi command is not necessary, since after firstboot
  configurehood will run "wifi" in any case

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
- Changed to base on the ubnt board names
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-09-17 12:38:10 +02:00
Tim Niemeyer 0447d0c709 fff-boardname: introduce new ubnt boards
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-09-17 12:38:03 +02:00
Tim Niemeyer decd4ed402 fff-hoods: add dependency to fff-vpn-select
The vpn-select is used by fff-hoods.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-11 15:48:42 +02:00
Tim Niemeyer 21dcd57a16 fff-sysupgrade: move config migration to fff-config
Seems like the /etc/config/fff is owned by fff-config.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-11 15:48:42 +02:00
Tim Niemeyer c1fc513cef buildscript: remove community config
The community file is not used anymore.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-06 15:31:32 +02:00
Adrian Schmutzler 53184f63fb vpn-select: Demand hood file to be provided as argument
By removing the reference to the hood file from vpn-select, we
remove the entire dependency from fff-hoodutils.
vpn-select will now work with any file provided, as long as
it has the correct syntax. At the moment, the only provider
is the configurehood script. Since the various hood file variants
are handled there, it seems logical that configurehood also
chooses and provides the correct hood file for vpn-select, instead
of vpn-select which had no other contact with hood file choice.

This is simple, tidy and effective.

Adjusted some comments.

Fixes #106

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-08-02 18:59:11 +02:00
Robert Langhammer 62fd2b71e0 Remove double square bracket. [[ is a bash or ksh built-in, and cannot be used in a #!/bin/sh script.
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-26 21:57:57 +02:00
Robert Langhammer 37c634ba7c Remove double equals.
== is a bash specific alias for = , and
should not be used in #!/bin/sh scripts. Not in #!/usr/bin/haserl scripts
either, where the shell defaults to /bin/sh.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
- rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2018-07-26 21:57:34 +02:00
Adrian Schmutzler 348cdbe8d3 nodewatcher: Change mechanism for client device detection
This is simpler than the previous approach and does not rely
on parsing.

This fixes:
- Interfaces being accounted for multiple times for certain
  devices
- Errors when output of bridge function changes (as with the
  current OpenWrt master)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-07-26 09:22:32 +02:00
Adrian Schmutzler f986d59080 configurehood: Don't remove timestamp for checksum comparison
Timestamps in hood file currently only change if changes are
made. Thus, there is no reason to remove them for comparison.

This also fixes the wrong quote characters in the script, which
changed the script in a way the timestamps aren't removed right
now anyway.

After this change, a hood reconfiguration may be triggered by
just changing the timestamp at the keyxchange.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-07-25 23:00:40 +02:00
Adrian Schmutzler 4a266c8301 hood files: Move files from /www to /tmp and link there
With this patch, changing the hood file happens in
memory, so we do not have to write on flash "frequently".

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-07-25 23:00:27 +02:00
Adrian Schmutzler 9351f226ba configurehood: Only provide hood file from GW/KeyXchange via WWW
This will copy to hoodfilewww every 5 minutes!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-07-25 23:00:12 +02:00
Adrian Schmutzler d0ef635bd4 hood file: Use different files for www and for checksum comparison
At the moment, we use the same file for detecting changes in a
new hood file and for broadcasting the hood information to be used
by mesh routers.

However, there may be situations where we don't want to broadcast
an existing hoodfile. We, on the other hand, cannot delete it
then, as we need the file for checking changes in the temporary
hoodfile.
We also cannot just switch the wXconfig state to achieve this
goal, as we need a trigger to do that (which is the same file we
are discussing about).

So, in this patch, we introduce two files, one for the checksum
comparison and one for the hood info broadcast. Those can now be
set and deleted (in a later patch) as it is required by their
respective tasks. This should also improve code clarity to the
reader ...

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-07-25 22:59:57 +02:00
Adrian Schmutzler 845886d16a hood files: Use more meaningful and concise naming scheme
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-07-25 22:59:40 +02:00
Robert Langhammer d09df921e0 Update tunneldigger
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-25 14:26:43 +02:00
Adrian Schmutzler a8779c66c9 Data processing notes: Add for SSH access
To provide data processing information for SSH access without
annoying users too much, this adds a pointer to more extensive
information to the banner displayed after login.

The referenced files then contain similar information to what
is shown in the WebUI.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-07-25 14:20:36 +02:00
Adrian Schmutzler 14718ff10b Data processing notes: Add in fff-web
This adds a first version of data processing information to the
Web UI's settings page (where the information is entered).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-07-25 14:20:22 +02:00
Adrian Schmutzler 059a48f95d fff-batman-adv: Remove vis_mode from uci config
According to the upstream repo, vis_mode has been removed since
batman-adv 2014.0.0.

See openwrt-routing/packages 8a66ed1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-07-25 14:15:32 +02:00
Fabian Bläse b194e8f8cd Remove sectorfile for first release
To reduce the number of possible corner cases
in the first keyxchangev2 release, this patch
removes the sector file with the intention to
add it back after release.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2018-07-25 14:14:26 +02:00
Adrian Schmutzler b4ab6ed3e9 configurenetwork: Improve output when setting IPv6 addresses
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-06-17 17:55:38 +02:00
Fabian Bläse bce43a3a27 Allow initial configuration from Ethernet
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhgammer <rlanghammer@web.de>
2018-06-16 00:36:37 +02:00
Fabian Bläse bb496df2bc Move hoodfile acquisition into function
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-06-16 00:36:28 +02:00
Tim Niemeyer 1826d39064 Revert "configurehood: Prevent connecting two hoods"
Fixes #95

This reverts commit 6cc6b4b786.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2018-06-11 18:57:50 +02:00
Tim Niemeyer 10109a5045 fff-hoods: call reload_config after uci commit
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2018-06-11 18:57:42 +02:00
Tim Niemeyer c54fcf9b86 fff-hoods: set hood to none if on station mode
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2018-06-11 18:57:35 +02:00
Tim Niemeyer 00767f92ad fff-macnock: new package
Fixes #68

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2018-06-11 18:57:22 +02:00
Robert Langhammer a7544befc5 fff-network: correct path to iptables
Fixes #94

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-03-04 15:48:37 +01:00
Adrian Schmutzler 0f605ec2fd configurehood: Fix "wifi" blocking correct network status detection
In commit 5c1d3b1, conditions were changed so that "wifi" is called
almost every run directly before the network status (internet vs.
gateway contact vs. wXsta).

This causes strange effects configurehood and nodewatcher, which is
called at the same time.

The fix only does "wifi" if required and waits 10 sec. after that.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-03-03 22:23:32 +01:00
Tim Niemeyer bd5985e99e fff-network: enable forwarding; filter forwarding
Fixes #83
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
2018-03-03 21:34:36 +01:00
Tim Niemeyer 6863c6235d fff-network: rework sysctl's
Just disable autoconf.

Some sysctl's are currently not available due some missing kernel
features. Maybe some day they reappear.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
2018-03-03 21:34:36 +01:00
Tim Niemeyer 9f263c1b38 fff-firewall: clean up v6 rules on prepare
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
2018-03-03 21:34:36 +01:00
Tim Niemeyer 7cb79452fd fff-network: move sysctl settings to a function
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
2018-03-03 21:34:36 +01:00
Tim Niemeyer f65b7fc2ab bsp/default: move network sysctl's to fff-network
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
2018-03-03 21:34:35 +01:00
Adrian Schmutzler a86f45c269 fff-web: UPGRADE_PATH in header should be taken from hood file
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-03-03 17:51:38 +01:00
Christian Dresel 9a470994aa Disable VPN if not in use
The simplest and fasted way to
Fixes #72

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-02-13 18:50:31 +01:00
Adrian Schmutzler 55f6182a75 packages/fff: Split fff-hoods into two packages
Code which is reused by other functionalities is put into the
fff-hoodutils package, so it can be used without including
configurehood.

This also allows setting missing dependencies of other packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-02-11 00:10:41 +01:00
Adrian Schmutzler 5c1d3b1f35 configurehood: Improve conditions for configap setup
This addresses a bunch of issues:
- Previously, only the presence of w2configap was checked. With
  only 5 GHz, this would have caused a recreation every 5 min.
  (Note that this is only valid for a 5 GHz only device, as we
  always create all interfaces for disabled radios)
- The two outer if-statements are merged
- We now check for presence of wXmesh to enable wXconfigap. Although
  this is no necessity (as the hood file contains the whole config)
  this assumes that a disabled wXmesh means no intent of the owner
  to connect to other devices on this radio.
- With the dependency of wXconfigap from wXmesh, this patch now
  enables the deactivation of hood file transmitting by disabling
  meshing in the hood file

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-02-11 00:06:45 +01:00
Adrian Schmutzler 04105ad510 fff-web: Fix two bugs in wifiscan.html
Bug 1: If devices with hidden SSID are present, the matched
SSID in the awk contains the newline (="unknown\n\t"). This
destroys the table after the sort.

Bug 2: If SSIDs contain ampersands (yes, people do that),
they are now converted to &amp;.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-28 12:53:38 +01:00
Adrian Schmutzler 686da98770 nodewatcher: Provide data to calculate airtime
The actual calculation is done in the Monitoring.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-01-28 12:36:14 +01:00
Tim Niemeyer 69b1c6e356 WR841-v7: get routermac from phy0 instead of wlan0
Fixes: #71
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-01-21 14:55:21 +01:00
Adrian Schmutzler 145e057a77 fff-nodewatcher: Add detailed clients data
This adds data about the clients per interface

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2018-01-21 14:55:19 +01:00
Adrian Schmutzler c7ffb50d3d fff-hoods: Restart alfred after keyxchange file update
This is a workaround to enable alfred on routers which do not see
a configap during initial boot.

Fixes: #78

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-21 13:50:28 +01:00
Adrian Schmutzler ef1ec21462 GL-AR150: Fix ETHMESHMAC
The AR150 seems to have the same MAC address on eth0, eth1 and
phy0. Although it is not a ONEPORT, we can use the shifted bit
like for the ONEPORT devices to get a distinct ETHMESHMAC.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2018-01-21 13:07:29 +01:00
Adrian Schmutzler 568ce35d06 fff-sysupgrade/fff-hoods: Make sectorfile upgradesafe
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 15:20:52 +01:00
Adrian Schmutzler 430049d1b3 fff-hoods: Replace hiddenapflag by check for real conditions
Instead of using the hiddenapflag file, we can just check whether
the hood file copy used by the webserver is present. As a second
condition, we check whether the w2configap is not configured yet.

This fixes the following minor issue:
Previously, if configurehood has run once, the hiddenapflag was
set, but the configap not set up yet. If then a restart happens,
the flag is gone (/tmp), but not recreated until a change in the
hood file appears. Thus, no configap would be set up until that
point.
Since we check for a real condition now, this can't be happening.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 15:16:47 +01:00
Adrian Schmutzler bef333c43b nodewatcher: Fix bugs in gateway list creation
Changes:
- Remove first line (headline) previously parsed as gateway
- Delete leading whitespaces for netif correctly (regex
  "\\[" changed to "\\[ *")
- Remove netif whitespaces first, so they are not changed to
  "false"
- Include trailing whitespace in regex for selection marker
- Remove useless replacement "  " to " "

This is designed to support BATMAN compatibility version 14 AND 15

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 15:11:34 +01:00
Adrian Schmutzler 90c8526873 fff-network: Calculate IPv6 using ROUTERMAC variable
If the mac is read from /sys/class/net/${iface}/address, some
devices (WA860RE, Picostation) will not set the fdff addresses.

This can be fixed by using the $ROUTERMAC in configurenetwork.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 14:48:19 +01:00
Adrian Schmutzler 6ad42be496 fff-network/fff-hoods: Only use MAC address in network lib
Previously, IPv6 addresses were constructed by reading from
the device config file in the function. To have more options,
it is better to use the address itself as parameter.

By this way we can decide what we use for getting the MAC when
calling.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 14:47:58 +01:00
Adrian Schmutzler de36cb4c17 configurenetwork: Put One- and Two-Port pre-setup into function
This is a cosmetical patch, however it does increase the overview
a lot in my opinion.

We cannot drop the special case of the two-port devices, because
we need the current setup to enable setting port mode in the Web
UI.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 13:35:21 +01:00
Christian Dresel 9e0952e01e fff-hoods: Make possible to use fixed hoodfile
Add a complete hoodfile to /etc/hoodfile to use only this file

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
- Changed according to Adrian's review
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 13:06:57 +01:00
Adrian Schmutzler 12804b8ff6 nodewatcher: Provide additional information about WiFi interfaces
This patch additional information to the nodewatcher XML:
- wlan_channel: Channel of interface (number only)
- wlan_ssid: SSID available through iw dev
- wlan_type: Type of interface (AP, mesh, IBSS)
- wlan_width: Width of frequency band (20 vs. 40 MHz, number only)

The nodewatcher file from this patch can be copied manually to
devices with older firmware.

The patch includes some comment typo fixes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2017-12-31 15:40:59 +01:00
Adrian Schmutzler 6cc6b4b786 configurehood: Prevent connecting two hoods
To prevent connecting hoods, this patch loads keyxchange files
from the local network (eth0.3/eth0) before it uses the gateway.

Thus, if other files are provided via wXconfigap, they are just
ignored. If a router is connected to two hoods by cable, it will
just disable the interfaces where a second hood file is detected
and wait until the next call of configurehood.

If cable and wXmesh are different, the cable has precedence.

If two hoods are present via cable on the same eth, wXmesh has
precedence.

If two hoods are present via cable on different eth, the first
eth has precedence and all others are disabled.

If cable has precedence, wXmesh is configured with the hood
file from cable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-12-23 14:31:01 +01:00
Adrian Schmutzler 696c983f22 configurehood: Wait for the config AP to build when in sta mode
The configurehood script is started at the same time for all
routers. Thus, if one router sets up its configap, another may
just go into wXsta at the very same moment. This creates a race
condition between configap setup and wXsta download.

To circumvent this, we add a sleep to the wXsta routine, so the
wXsta always comes later, but is still run every 5 minutes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2017-12-23 13:26:27 +01:00
Christian Dresel 7b0add8c70 Add support for Unifi AC Mesh
This is the correct firmware for the Unifi AC Mesh I have only
tested at Unifi AC Mesh and not at Unifi AC lite But my information
is, that both have the same Hardware

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-23 13:14:06 +01:00
Robert Langhammer 6b296ddf35 Update tunneldigger
We need the new tunneldigger because the old broker no longer works with the current kernel.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2017-12-23 13:09:32 +01:00
Adrian Schmutzler f9e98f3ebf fff-network: Commit only network
Since we change only the network part of uci, we only need to
commit this part and not the whole config five times.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
- Rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-12-23 12:59:07 +01:00
Adrian Schmutzler bac439a254 fff-web: Allow minus (-) in passwords
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-12-23 12:54:14 +01:00
Adrian Schmutzler eff6b0a305 fff-network: Fix second occurrence of ROUTERMAC and ETHMESHMAC
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2017-12-22 14:26:10 +01:00
Adrian Schmutzler 8e5e7cba47 fff-web/show_info: Put common code into function
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-13 19:22:44 +01:00
Adrian Schmutzler 232b8bff62 fff-web: Include new options into settings.html
This includes the new options introduced due to the
/etc/config/fff file into the WebUI.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 20:28:59 +01:00
Adrian Schmutzler a4c9978f5a fff-web: Added options to disable update notification
Update notification is enabled by default. If required, this
allows disabling it permanently.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 20:28:56 +01:00
Adrian Schmutzler 84432f7bbf fff-support: Update PoE passthrough code
This implements an upgrade safe solution for the PoE passthrough
on multiple devices. Since LEDE already provides the relevant
settings, a check whether those are in place enables both
identification of affected devices and automatic deactivation
if parameters are changed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 20:28:54 +01:00
Adrian Schmutzler 39d147da8d Rearrange fff config values into their own config file
This moves the FFF configuration from
/etc/config/system to a new file /etc/config/fff. Thus,
this file can be copied as a whole during upgrade (with
compatibility provided) and then resulting values in
other files are re-set later.

This also fixes the bandwidth settings not being persistent
during upgrade. Other settings may join ...

I tried to go through all the code and update all occurrences
of the relevant system variables (looking for "system" both
in GitHub and my local src folder).

Note that a downgrade will result in loss of configuration!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
- Rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 20:28:52 +01:00
Adrian Schmutzler 09a84bdd7b show_info: Display hood information
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 20:28:51 +01:00
Adrian Schmutzler a9b3dfd7e0 fff-web: Show WiFi channels and SSID
This patch introduced more detailed information about the
hood in the WebUI, i.e. channel and SSIDs.

The patch includes a reorganization of the columns.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-By: Fabian Bläse <fabian@blaese.de>
2017-11-12 20:28:49 +01:00
Adrian Schmutzler 1f79cab957 show_info: Add assignment without switch
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-11-12 18:21:08 +01:00
Fabian Bläse 7ea8df5264 CPE510: Add ROUTERMAC
This adds missing ROUTERMAC variable for CPE510

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-11-12 18:07:51 +01:00
Fabian Bläse 078bb80a53 fff-network: Get MAC from wifi device instead of wifi network
Using wifi devices makes it possible to get mac address
without having to configure wifi networks.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-By: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
- Increment package version
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 18:02:32 +01:00
Tim Niemeyer bdceb7bb6f fff-alfred: do not use bat0 for master selection
During system boot, the dependency of alfred to the bat0
interface is problematic. In some circumstances (no eth mesh
and no wifi mesh), the mesh interfaces are disabled, the
bat0 interface is removed and the station mode is entered.

Because alfred is started after the station mode (current
boot order), it doesn't start up with the missing bat0 interface.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-11-12 17:32:33 +01:00
Tim Niemeyer 1b7bfb63cd fff-alfred: new package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-11-12 17:32:23 +01:00
Fabian Bläse f3dd36b8da configurehood: Allow for spaces after identifier
Some JSON beautifiers put spaces between identifier and value.
This is necessary to tolerate that.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 17:28:59 +01:00
Fabian Bläse 1eaa0075fd Use SWITCHDEV variable for mac address fixing
This makes use of the SWITCHDEV variable to ensure that the
correct interface is used for mac address fixing on devices,
that do not use eth0 for the switch.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-11-12 17:28:42 +01:00
Adrian Schmutzler 8297da7051 fff-web: Fix style and XHTML conformity in upgrade.html
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-11-12 17:26:43 +01:00
Adrian Schmutzler 56c07144f7 fff-hoods: Suppress warning for missing sectorfile
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-04 15:51:49 +01:00
Tim Niemeyer 90e0643b29 fff-hoods: move hiddenapfile variable
Move the variable definition to the implementation file. This is more
intuitive and the variable is not used otherwise.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-04 15:51:35 +01:00
Adrian Schmutzler 72942057bc fff-hoods/fff-wireless: Don't delete WiFi devices
We only want to remove WiFi interfaces, not devices during
reconfiguration. This still allows for complete reconfiguration,
but does not remove device attributes like a disabled 5 GHz or
similar.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-04 14:49:19 +01:00
Adrian Schmutzler 46d8b9b8b2 fff-network: Fix mac adresses not set during merge/rebase
Some MAC adresses were forgotten/not updated in a previous
patch. This is fixed now.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2017-11-04 11:13:28 +01:00
Adrian Schmutzler 915c6f063e Add TL-WR1043N v5
This is based on the LEDE pull request as on 2017-10-17.

Tested successfully on device (including flashing factory
image, no TFTP).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-03 22:47:53 +01:00
Adrian Schmutzler 063baa5edd fff-boardname: Reorganize WR841 boardnames
This patch achieves multiple goals:
- Align WR841 boardnames with image names
- Fix wrong name replace in sysupgrade
- Support sysupgrade of WR841 v12

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
- Rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-11-03 22:45:12 +01:00
Adrian Schmutzler 20be967e65 fff-web: Extend switch port assignment display in ports.html
This adds information to the switch port overview and shows
the VLAN configuration. For some routers the port order is
provided, so the physical arrangement is resembled in the
Web UI.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-03 22:35:55 +01:00
Tim Niemeyer e22663a673 fff-hoods: only delete hiddenapfile if ap was configured
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-03 22:30:27 +01:00
Fabian Bläse 5120b9a59d fff-network: evaluate macaddress in device config
This allows for more latitude when evaluating the addresses needed for br-mesh and ethmesh.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-03 22:28:46 +01:00
Adrian Schmutzler ca9459ee3c CPE210: Fix ROUTERMAC
The ROUTERMAC is not set in the network.* file. This causes a problem
when the ULA addresses are set based on the br-mesh MAC. If we just
add the ROUTERMAC, everything should be fine.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2017-11-03 14:34:17 +01:00
Adrian Schmutzler 566d762148 fff-network/fff-hoods: Create functions for IPv6 rewriting
This puts the code for creating IPv6 addresses from MAC
address and EUI into functions, so it can be reused.

This should be particularly helpful if code is rewritten later.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-03 09:30:14 +01:00
Adrian Schmutzler 85510f25b3 fff-hoods: Fix missing commit for hood name
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-02 21:10:26 +01:00
Robert Langhammer 66cb34c802 fff-hoods: fix sed to substitute timestamp
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2017-11-02 20:56:57 +01:00
Adrian Schmutzler 6daffa2485 fff-hoods: Use w5sta for download
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2017-11-02 20:54:43 +01:00
Adrian Schmutzler b88841352c fff-hoods: Use variables for hood file names
Since names may change, this puts the relevant file names for
hood files into variables, so they can be changed at once
without the risk of forgetting some occurrences.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2017-11-02 20:52:51 +01:00
Fabian Bläse 4f3c30eb0e consistently use same webserver port for hoodfile on wifi and lan
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer rlanghammer@web.de
2017-11-02 20:47:13 +01:00
Adrian Schmutzler 3f607e106f fff-hoods: Introduce sector files for custom settings
While the hood file is only set by the keyexchange/hood, this
introduces a local additional configuration in a second file.
This file is retrieved from the first configap we got in w2sta
mode, of which we save the fdff address to identify it later.
Thus, a router always "knows" its specific uplink, as long as
the gateway connection is stable; otherwise: reset.

The implementation is similar to the hoodfiles with a tmp
version and a copy in the /www/public. On the "section head",
the initial configuration is located in /etc/sectorfile and
distributed from there to other nodes. Syntax should be like
the node file, except that it only contains the values to be
overwritten.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2017-11-02 20:39:39 +01:00
Adrian Schmutzler 1b568d96a7 fff-hoods: Use channel provided by gateway
This prevents setup if a channel is missing (json defective)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2017-11-02 20:39:05 +01:00
Adrian Schmutzler b817c3813c Revert "Archer C25: Disable 5 GHz to provide working firmware"
Since disabling 5 GHz is complicated with KeyXchange v2, we
enable it again.

This may lead to an instable device!

This reverts commit f47e046293.
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-16 21:20:28 +02:00
Adrian Schmutzler e7e27c168c Utilize PKG_NAME in Makefiles
Since there is a PKG_NAME variable, there is no need to repeat
the individual package name five times.

This makes editing and particularly copying Makefiles much
easier, as only the PKG_NAME has to be changed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-16 21:20:02 +02:00
Adrian Schmutzler c4ae6bf216 fff-hoods: Fix case of missing keyxchangev2data
This fixes a missing /tmp/keyxchangev2data due to gateway
misconfiguration.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
- Added double quote around $jsonfile
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-10-16 21:18:10 +02:00
Adrian Schmutzler 3d057de934 fff-hoods: Fix fe80::1 for multiple configap interfaces
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-16 21:16:37 +02:00
Fabian Bläse d788f843b6 Support batman-adv meshing over 802.11s
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-10-16 21:14:11 +02:00
Adrian Schmutzler c8c92466be Configure the Node a routable IPv6 ULA
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Christian Dresel <fff@chrisi01.de>
2017-10-15 17:30:40 +02:00
Adrian Schmutzler 9898e72a98 fff-web: Show hood in public and internal web interface
Tested by copy/paste of home.html

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-10-15 17:30:38 +02:00
Adrian Schmutzler 6463e2d2cf Remove references to community.cfg
This removes all references to community.cfg except in the
buildscript and except the file itself.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:34 +02:00
Adrian Schmutzler 235644be8d vpn-select: Use keyxchangev2data instead of fastd_fff_output
This is a first consolidation step which gets rid of
/tmp/fastd_fff_output, but still requires /etc/fastd/fff/peers/*

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:28 +02:00
Christian Dresel 4cd8b8eac2 Add fff-hoods
This package connects to keyxchangev2

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:24 +02:00
Christian Dresel b18bfb193d Reconfigure vpn-select for keyxchangev2
we need some little changes and copy some things to fff-hood later

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:21 +02:00
Christian Dresel 1d4dd25341 Reconfigure fff-wireless for keyxchangev2
Need more parameters in wifiAddAP to add hidden AP
Need new function wifiAddSta to add a station and download hoodfile

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:16 +02:00
Christian Dresel 60fecf6ea5 Update Batman to compat15
This is not compatible with the old Batman!

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2017-10-15 17:30:08 +02:00
Adrian Schmutzler 0d3d6f7f33 fff-nodewatcher: Use mac address instead of standard node name
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-14 17:38:48 +02:00
Adrian Schmutzler fd41c72013 simple-tc: Fix simple-tc not being active if set
Fixes: #55

This reintroduces the broken simple-tc.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-09-18 19:16:56 +02:00
Adrian Schmutzler dbc1dddb23 fff-web: Suppress error if WAN/mesh statistics files are missing
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-09-17 17:06:34 +02:00
Tim Niemeyer fb757c6f8f fff-wireless: fix shellcheck errors
In src/packages/fff/fff-wireless/files/lib/functions/fff/wireless line 26:
    local radio="radio$(echo $phy | tr -d -C [0-9])"
                                 ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                 ^-- SC2060: Quote parameters to tr to prevent glob expansion.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-09-17 16:45:25 +02:00
Tim Niemeyer daa613722c fff-random: rewrite in C
Fixes: #51

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-09-17 16:36:35 +02:00
Christian Dresel 15d514bbd1 deactivate 802.11b
Hiermit wird 802.11b auf den Knoten deaktiviert

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-09-17 16:20:07 +02:00
Adrian Schmutzler 2567b53334 vpn-select: Fix case of missing .pid file
Bug: If /tmp/run/fastd.${project}.pid is missing, the directory
/proc/ is checked instead of /proc/{something}.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-09-17 16:16:58 +02:00
Adrian Schmutzler 4dbf136a31 fff-network: Make custom port configuration update-safe
This writes CLIENT/BATMAN/WAN port configurations for devices
with switches to a separate file. This file can be changed
based on the desired setup and is then preserved during
firmware upgrade. In case of a future bugfix concerning the
entries of a specific network.* file, this will still be
effective as only the port configurations reside in the
new file, while the other settings could be overwritten by
the upgrade.

For one- and two-port devices, adjustments have been made so
that their relevant settings also reside in the new file now.

This also adds a WebUI interface for setting the two-port
devices (CPE210 and CPE510).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
 - Changed doc in network.mode
2017-09-17 16:09:28 +02:00
Adrian Schmutzler b0974e0afc fff-network: Prevent resetting network config on each reboot
This only sets the switch configs if they are not set yet.
If the network.* file is edited, add FORCEPARSE=1 to apply
the changes.

Fixes #56

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-09-17 15:37:45 +02:00
Christian Dresel 21a585274e Fix a litte variable error and descripte AdHoc error better
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-08-20 14:34:29 +02:00
Adrian Schmutzler fb8290b8ec show_info: Add extended switch scheme and bandwidth control
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-08-20 14:23:13 +02:00
Adrian Schmutzler fad3d8f502 fff-support: Provide shell script with output similar to WebUI
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-08-20 14:20:42 +02:00
Adrian Schmutzler 86712343fe WebUI: Partially fix XHTML conformity in settings.html
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
 - Rebased
2017-08-20 14:18:29 +02:00
Adrian Schmutzler f47e046293 Archer C25: Disable 5 GHz to provide working firmware
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-08-20 13:58:44 +02:00
Tim Niemeyer 4d4aa50ffb Add support for TP-Link C25
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-08-20 13:58:36 +02:00
Adrian Schmutzler 13f267fcfb fff-network: Remove empty lines from network.* files
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-07-31 23:46:46 +02:00
Adrian Schmutzler 10cd048450 fff-web: Fix setting hostname in settings.html
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewd-by: Tobias Klaus <tk+ff@meskal.net>

- added quotes
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
2017-07-31 23:39:56 +02:00
Adrian Schmutzler ee5459ee2f fff-network: Remove unused file for WR841N v12
The WR841 v12 is using the file from v11, the new file has never
been used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-07-28 07:48:22 +02:00
Tobias Klaus 4d2a42cb53 nodewatcher: fix parsing error
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-07-28 07:46:04 +02:00
Adrian Schmutzler abc5edd920 WebUI: Fix XHTML conformity in public files
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-07-28 07:44:31 +02:00
Tim Niemeyer 2d3cbdf73a fff-sysupgrade: fixes shellcheck errors and warnings
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-07-28 07:42:10 +02:00
Tim Niemeyer 6865009d56 fff-sysupgrade: Security question with yes/no
Fixes: #31

Changes from Bjoerns ticket. Thanks.

CC: freifunk@bjoernengel.de
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-07-28 07:40:44 +02:00
Adrian Schmutzler 2caf86d946 WebUI: Show firmware update notification in WebUI
Displays update notification for user, but does not provide
automatic updates. Version comparison is based on string match,
so build dates are not relevant.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Michael Fritscher <fff@mifritscher.de>
2017-07-02 18:38:00 +02:00
Jan Kraus 1bfb0b0611 Revert "Added an automatism which will retrive Router-Coordinates from the old Netmon system"
This reverts commit d6f2f18e49.
The Netmon is gone, so this workaround is not needed any longer.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
- Removed micrond dependency and rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-07-02 18:11:38 +02:00
Adrian Schmutzler 996f64c4db WebUI: Fix XHTML conformity in WebUI header file
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-07-02 17:46:34 +02:00
Adrian Schmutzler 32fe76229f WebUI: Use br-mesh to retrieve MAC address
This reads the MAC address independent of option macaddr being set
in /etc/config/network. Tested (mesh only) on AR150, CPE210,
Pico M2HP and WR841 v10.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-07-02 17:45:52 +02:00
Christian Dresel b287daaf06 Add Hoodinformation to Nodewatcher
Fixes: #38
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-07-02 17:45:25 +02:00
Adrian Schmutzler 9fc20ae9cf WebUI: prohibit strange special characters in password
Restricts password to A-Z, a-z, 0-9 and !#$%()*+,.:;=?@^_

Fixes #40

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-07-02 11:11:04 +02:00
Robert Langhammer d8a2b78856 Start fastd only if there are fastd peers left
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-06-03 16:19:54 +02:00
Robert Langhammer 8484f73cf2 Do not write tunneldigger conf on flash
Fixes: #41

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-06-03 16:19:46 +02:00
Adrian Schmutzler 20ea0c6d8e fff-nodewatcher: write WAN status to XML (fastd and L2TP)
Fixes #30

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>

deleted some trailing whitespaces
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
2017-06-02 23:20:07 +02:00
Adrian Schmutzler 5452cd8baf WebUI: show VPN status for both fastd and l2tp individually (adds L2TP status)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-06-02 23:20:07 +02:00
Adrian Schmutzler 438ac70cb9 fff-network: removed comment from TL-WR841 network files
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-06-02 23:20:07 +02:00
Adrian Schmutzler aa22b8809c Add support for WR841N v12
This patch adds support for the WR841N v12. For TFTP recovery, the
image name has to be wr841nv11_tp_recovery.bin (with 11, not 12)!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-06-02 23:20:07 +02:00
Fabian Bläse da71f7f339 Add support for tl-wa901nd-v2
Signed-off-by: Fabian Blaese <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-05-30 18:29:01 +02:00
Christian Dresel 9cd2738b36 Add support for wr1043 v4
Dieses Patch fügt den Support für den WR1043 v4 hinzu. Dieses Patch
baut auf den LEDE Patch auf und darf erst nach dem LEDE Patch
applied werden.

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-02-18 13:55:42 +01:00
Tim Niemeyer 32df7e55fe bsp/default: remove/update etc/config/system
- This will fix the LEDs on LEDE
- We will lose the power heartbeat trigger on the LED
- We will lose the VPN signaling on the LEDs

While remove the default system config, the LEDE system now
configures wrong ntp service. We fix this by deleting these
entries in the fff-timeserver package.

If the file is already present on the devices, we need to upgrade it.
Therefore the 05-config-system-migration is now part of the fff-sysupgrade
package.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2017-02-18 13:55:38 +01:00
Tim Niemeyer 439fd9e8c7 lede: some images are renamed
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2017-02-18 13:55:22 +01:00
Tim Niemeyer db52740905 fff-sysupgrade: install config via uci-defaults
Unfortunately the sysupgrade.conf is installed by base-files. The installed file
just contains examples and will be overwritten with this.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2017-02-18 13:55:13 +01:00
Tim Niemeyer 9ff2a699b6 fff/web: uhttps has now buildin tls support
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2017-02-18 13:54:55 +01:00
Tim Niemeyer 8460b603ec fff-web: fix uci command line syntax
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2017-02-18 13:54:37 +01:00
Tim Niemeyer abf995eaeb openwrt: get rid of the default router packages
- removes e.g. dnsmasq, firewall
- needs to add some of the basic packages to fff-base

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-02-16 21:31:27 +01:00
Jan Kraus 74bc7e7949 Fixed unwanted reboot every 5 Minutes after -n flash
The error only occurs if there isn't any network connection.
Fixes #23
Also added prevention for applying empty coordinates.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-01-10 19:31:35 +01:00
Steffen Pankratz 008911cd20 fff-nodewatcher: fixed typo
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-11-05 10:56:05 +01:00
Steffen Pankratz 794afe2d66 Temporarily added tunneldigger package as a fff package.
Because we want to test this tunneldigger version in order to move on
with https://github.com/wlanslovenija/firmware-packages-opkg/pull/10

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Robert Langhammer rlanghammer@web.de
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-11-04 08:02:45 +01:00
Jan Kraus c739a6c0c3 Added support for Archer C7 v2
5Ghz AdHoc is not working with current ath10k driver.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-10-30 13:25:56 +01:00
Steffen Pankratz 03e3104273 Nodewatcher: interpret 'description' and 'position_comment' purely as textual data
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-10-30 13:07:02 +01:00
Christian Dresel bee682345a Increase SSH Connection Limit
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-10-30 13:05:04 +01:00