Compare commits

...

878 Commits

Author SHA1 Message Date
Dennis Eisold 4721f2086e Restored second cronjob 2022-03-07 17:46:04 +01:00
Dennis Eisold b75041997b Send json file directly instead of cat 2022-03-07 11:33:17 +01:00
Dennis Eisold 9c97da67ca Combined crawl data and send data 2022-03-07 11:12:23 +01:00
Dennis Eisold e11cb2d012 Fixed mqtt send 2022-03-07 10:19:50 +01:00
Dennis Eisold b52801fe14 Moved json part to own nodewatcher-json 2022-03-07 10:07:59 +01:00
Dennis Eisold 9cc28b9114 This patch adds json to the mqtt monitoring package.
Signed-off-by: Dennis Eisold <mcules@freifunk-hassberge.de>
2022-03-07 08:52:41 +01:00
Johannes Kimmel 87d923c1ef fff-dhcp: increase dns cachesize
The default cachesize for dnsmasq is 150 entries, which results in a
poor cache hit rate.

Raise the default to 1024 to provide better cache hit rates on all
devices while still keeping memory usage in check.

Further increase the cachesize to 8192 entries for systems with enough
ram (currently more than 64MB).

The memory usage will increase roughly 100B per entry.

The size was chosen empirically. Higher values don't seem to increase
cache hit rate a lot.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2022-03-05 19:31:00 +01:00
Christian Dresel 0e8c32a363 fff-layer3: add snmp-utils package
This adds snmp-utils support to facilitate testing future uses for s2nproxy

WIP/RFC for s2nproxy:
freifunk-franken/firmware#194

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2022-03-05 18:19:20 +01:00
Fabian Bläse a5ad4a9b00 fff-config: Set panic on OOM
The OOM killer does not make much sense on a router, because regardless
of which process is killed, most of the time some essential core
functionality is affected.

Set the panic on OOM sysctl, so every OOM leads to a kernel panic and
results in a reboot of the router, which restores a clean state.

Fixes: #131

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-03-05 18:19:13 +01:00
Fabian Bläse 17bc1a7e62 fff-layer3-config: Always clear client interface list completely
Previously, some interfaces in the client ifname list have been kept.
The actual reason for this is unknown, it might have been used for the
bat0 interfaces.

Filtering the interface list in this way might lead to interfaces being
retained unintentionally, especially with the diverse naming of DSA
interfaces.

As it is not required anymore, remove the retention of some interfaces
completely.

Fixes: #207

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-03-05 18:19:02 +01:00
Fabian Bläse 330ed1b52d build_patches: Add hack which fixes forwarding on a stacked bridge
Currently we are utilizing stacked bridges to keep configuration of DSA
devices as close as possible to swconfig devices. The lower bridge is
for configuration of the DSA hardware and is vlan-aware, while the upper
bridge is used to connect wireless interfaces to the client interface.

A packet arriving from the switch might have the offload_fwd_mark flag
set in the skb to prevent it from being sent to DSA ports, as this has
already been done in hardware.

However, this flag is not cleared before the skb is processed by the
upper bridge, which prevents it from being sent to any other ports of
that bridge. Therefore, communication is not possible between different
ports of that bridge, while communication with the bridge interface
itself is possible.

This issue affects both the layer3 and node variant, but due to the
layer 2 architecture of the node firmware, it is far more noticeable in
the node firmware, as it prevents ethernet clients from sending packets
to the gateway.

Work around this issue by clearing the offload_fwd_mark flag before
passing the skb up.

Fixes: #205

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-03-05 18:18:51 +01:00
Fabian Bläse 5b23824344 fff-network: Remove hardcoded network config
The base network configuration has been completely migrated to
uci-defaults scripts and any existing network configuration is dropped.

Therefore, the hardcoded /etc/config/network configuration file is not
required anymore. Remove it.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:18:47 +01:00
Fabian Bläse 5424eb728c fff-network: restore accidentally removed packet_steering option
With the recent rework of the network configuration, any existing
configuration is dropped in a uci-defaults script (22-network-base) and
generated from scratch. When rebasing this rather old patchset, the
packet_steering option was overlooked, so it is missing now.

Restore the removed packet_steering option by setting it using a
dedicated uci-defaults script.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:18:21 +01:00
Fabian Bläse 209c9debbf treewide: reorder layer3-specific uci-default scripts
With a recent patchset the initial boot process of the fff-network
package has been significantly altered. The base network configuration
is now generated by a uci-defaults script which completely drops
any existing network configuration first (22-network-base).

Reorder some uci-defaults scripts which extend the base network
configuration with layer3-specific rules, so they are executed after
22-network-base.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:18:02 +01:00
Fabian Bläse 1c3328e64a Remove static configuration from dynamic script
Most of the configuration done in configurenetwork is static and does
not change after the first boot. Move this static configuration into a
uci-defaults script, which is only executed on first boot.

Configuration which might be changed at runtime (e.g. port assignment),
is kept in the configurenetwork script.

To improve readability and speed, combine multiple uci commands into a
uci batch. Drop any existing network configuration before applying our
own configuration. This requires the network.globals section to be
created explicitly. Also, the fdff:: addresses, ETHMESHMAC and ROUTERMAC
can be set unconditionally, as the uci-defaults script is only executed
once. Other than that, the static configuration has not been altered.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:18:00 +01:00
Fabian Bläse a8ce8e1ad6 fff-network: Remove unnecessary restart of fff-uradvd
The explicit restat of fff-uradvd is not necessary anymore, as
appropriate procd reload triggers have been added, and reload_config is
executed after every run of configurenetwork.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:17:59 +01:00
Fabian Bläse 3f765e4ba7 fff-network: Replace runtime configuration with reload_config
Instead of both setting values in the uci configuration and applying
them manually, only set the values in the uci configuration and do a
combined reload_config afterward.

This not only ensures that the changes to the configuration are actually
correct, but also decreases the runtime of configurenetwork.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:17:58 +01:00
Fabian Bläse 1917c8a1df fff-uradvd: Add reload trigger for network
fff-uradvd depends on values stored in the uci network config.
Therefore, a reload is required if the uci network config is modified.

As fff-uradvd does not support reloads, and possibly changing values are
given as command parameters, do a restart on procd reload.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:17:25 +01:00
Fabian Bläse c2f80c9999 OpenWrt: bump to v21.02.2
Bump core, packages and routing.

Remove upstreamed build patches.

Remove ath10k memory hack and use the newly added ath10k-smallbuffers
variant instead, but only for devices which actually require it
(and therefore use ath10k-ct-smallbuffers by default).

Adjust for the newly introduced band option for wireless devices, which
is now emitted by OpenWrt by default.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-03-05 18:09:49 +01:00
Adrian Schmutzler 27baecaf37 treewide: set PKG_RELEASE automatically
COMMITCOUNT allows to have the PKG_RELEASE calculated automatically
based on the number of commits for the package folder.

AUTORELEASE will count the number of commits since the last upstream
bump. This is relevant for packages with PKG_VERSION or
PKG_SOURCE_DATE set, but will not work for us since it assumes the
use of certain identifiers in commit titles.

COMMITCOUNT works fine for most of our packages, with the following
exceptions:

 * fff-nodewatcher would yield a commit count of 55, while the
   current PKG_RELEASE is 61. Thus, we do not touch it for now.

 * Packages that have been renamed will start counting from 1 after
   the rename, since folder renames are not tracked by git. This
   will result in descreasing PKG_RELEASE after the change for
   these packages.
   However, since moving essentially creates a new package anyway,
   counting from 1 makes sense conceptually, and PKG_RELEASE is
   still replaced for these packages.

 * alfred-json and fff-macnock use upstream code and thus would
   normally require AUTORELEASE. As discussed above, this will
   not work for us, so just leave these two untouched.

Note that all this is quite irrelevant for the way we use packages
currently, as without opkg PKG_RELEASE does not matter to us anyway.
So, let's just be happy about not having to bump PKG_RELEASE
anymore, while keeping the basic functionality intact.

The only package where the PKG_RELEASE is actually used for
something is fff-nodewatcher, where the version will be displayed
in the Monitoring.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: rebase, add new packages]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-01-09 22:03:09 +01:00
Christian Dresel 825d760bd8 Add package fff-layer3-snat
With this new package it is possible to do SNAT for client IPv4.

The user must set a router_ip in gateway.meta.router_ip, so an ip
address is available for peering interfaces and reachability.

Currently, no extra filtering is done, so the client interface should
only use ip ranges, which are already filtered from being announced
(e.g. 192.168.0.0/16).

Using NAT for IPv4 significantly reduces the need for big
Freifunk-global IP range allocations.

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Co-authored-by: Fabian Bläse <fabian@blaese.de>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Christian Dresel <freifunk@dresel.systems>
2022-01-09 21:58:30 +01:00
Fabian Bläse 51ec3648cf fff-babeld: Simplify CIDR mask removal
The removal of CIDR masks from ip addresses is changed to utilize
variable substitutions, which simplifies the expression.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-01-06 01:07:17 +01:00
Fabian Bläse 8ef6dba5a1 fff-babeld: Only select first list entry from router_ip
The router_ip option can be a list of multiple ip addresses. It is also
possible to specify a subnet using a CIDR mask.

Only a single ip is required for peering interfaces, so select only the
first list entry and remove the CIDR mask.

Fixes: #197

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-01-06 01:07:15 +01:00
Robert Langhammer a6b90f1a83 vxlan-node-vpn: add initial vid
Without a vid, netifd is running in an ifup-loop.
This situation is comming up after firstboot. An existing hoodfile causes a set vid.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-01-05 22:18:20 +01:00
Robert Langhammer 085dbb64fe fff-fastd: Add batman hardif hop_penalty
Openwrt v21.02.0 contains a new Batman Adv that now offers hop_penalty per hardif.
We can use this to prefer one tunnel for outgoing traffic if there are several VPNs. Eg. fastd and vxlan.

This Patch sets the hop_penalty for the fastd tunnel to 30.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-12-30 16:21:47 +01:00
Robert Langhammer 12f60419cd fff-node: Add package fff-vxlan-node-vpn
This package adds vxlan support to the node variant and configures the vxlan-vpn tunnels to the gateways.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>

---
A vpn section for vxlan in hoodfile:

    "vpn": [
       {
        "name": "gatewayname",
        "protocol": "vxlan",
        "address": "gateway.url" (or IP)
       }

"name" is optional.
---
2021-12-30 16:21:37 +01:00
Robert Langhammer 1febd2a9b2 fff-vpn-select: Make vpn-select modular
This rewrite makes vpn-select modular to easely add new vpn-protocols.

The stuff dependent on the vpn-protocol is outsourced to files in /usr/lib/vpn-select.d/ and comes in with the respective vpn package. In this way it is easy to select or deselect vpnprotocols to be build in.

vpn-stop is removed to use the protocol independent start/stop mechanism of vpn-select. Instead, a symlink is used.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-12-30 16:21:29 +01:00
Johannes Kimmel feeead6c43 fff-firewall: remove obsolete rules
20-clamp-mss:

Clamping is done in other parts of the network and to a very low static
value. This rules is very likely doing nothing at the moment.

20-filter-ssh:

These rules make use of the conntrack module to ratelimit incoming
connections. Using conntrack comes with a performance penalty for all
traffic. As an alternative, dropbear could be run behind an inetd(-like)
service that does the ratelimit, should removing this rule result in an
actual attack vector.

Removing both rules would enable us to unload the conntrack module all
together, potentially improving overall performance.

Fixes #183

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Acked-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:02:02 +01:00
Johannes Kimmel 9d745d0d5c fff-layer3-config: add missing -q option for uci get
Suppresses the unhelpful "uci: Entry not found" message when running
configure-layer3 -c in case there is no `ip6addr` set on the client
interface.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:01:44 +01:00
Fabian Bläse 7c3f3230ff buildscript: Split removal of chipset and subtarget
Some OpenWrt targets do not have subtargets. The filename only contains
the chipset in that case. Split the removal of chipset and subtarget
into multiple expressions, so the removal of the chipset works on
targets without subtargets as well.

Fixes: #187

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:01:36 +01:00
Fabian Bläse a3d62c7fcc Revert "Retain old compat_version for sysupgrade compatibility"
This reverts commit de9d4abf44.

As the compat_version has been bumped with the last release, this hack
can be removed, because the compat_version now is in sync with upstream.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:01:12 +01:00
Fabian Bläse c3cb53ebef buildscript: Generate checksum for *.tar and *.img
Some devices use .tar or .img for their firmware images. Our buildscript
currently only generates checksums for .bin files. Therefore, generate
checksums for .tar and .img files as well.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-By: Johannes Kimmel <fff@bareminimum.eu>
2021-12-24 14:41:18 +01:00
Fabian Bläse 40be50311b build_patches: cherry pick kernel bumps to 5.4.163
Our last firmware release has a very specific edge case failure, where
only the edgerouter-x using the node-variant images is unable to boot.

The root cause of this issue could not be identified, but using a
slightly newer or slightly older kernel release than the 5.4.154
included with openwrt-21.02.1 fixes this issue.

Therefore, cherry pick the kernel bumps to 5.4.163 from the
openwrt-21.02 branch until the next OpenWrt release to fix this issue.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-By: Johannes Kimmel <fff@bareminimum.eu>
2021-12-24 14:36:12 +01:00
Fabian Bläse 596a785ebc OpenWrt: bump to v21.02.1
Bump core, packages and routing.

Remove upstreamed build patches.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2021-12-20 19:19:29 +01:00
Fabian Bläse 6bf01bb070 fff-mqtt: Remove unnecessary mosquitto server
The mosquitto server is not necessary for the intended use case of
fff-mqtt. It was added to this package accidentally. Remove it to
prevent from running the server unintentionally.

Fixes: #174

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2021-12-20 18:51:50 +01:00
Fabian Bläse 37c7332555 Fix octeon bsp subtarget build
Add the missing subtarget variable, so the resulting binary is copied
from the correct location inside the OpenWrt build dir.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2021-12-01 12:31:22 +01:00
Johannes Kimmel 450312e237 fff-layer3-config: add rules for router_ip
If the router_ips don't happen to be included in the client network's
subnet, the decision defaults to a main table lookup. This causes
packets to choose the wrong interface.

This patch forces packets from a router_ip to be routed via the fff table.

Fixes: #175

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-12-01 00:06:08 +01:00
Fabian Bläse 5e7bdc0548 Drop support for devices with less than 8/64 MB flash/memory
Memory consumption has increased enough with OpenWrt 21.02, that
devices with 32 MB memory do not work reliably anymore.

It might be possible to work around the 4 MB flash limitation, but
reducing memory consumption is quite a bit harder. It is very likely
that this is only possible with a signifcant reduction of feature.

As we do not support any devices that have enough memory but only 4 MB
of flash, drop support for devices with less than 8/64 MB alltogether.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed by: Robert Langhammer <rlanghammer@web.de>
2021-11-28 15:09:42 +01:00
Fabian Bläse de9d4abf44 Retain old compat_version for sysupgrade compatibility
OpenWrt images contain a compat_version, which is used to block upgrades
to newer versions with incompatible configuration, if the configuration
cannot be migrated.

As we maintain our own configuration and all OpenWrt configuration files
are dropped on an upgrade, this upgrade block is not required.

To simplify the upgrade process, retain the old compat_version for the
next release. The compat_version should be bumped manually on release, so
we stay compatible with OpenWrt releases.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed by: Robert Langhammer <rlanghammer@web.de>
2021-11-28 15:09:42 +01:00
Fabian Bläse a72874f86f fff-network: Remove port override features of network.config
The port override feature of network.config is hard to maintain, since
changes to devices (e.g. port configuration updates, switch to DSA) have
to be applied to this manual override as well.

As this feature is probably hardly used anyway, remove it.
The port override migration for the Archer C7 v2 is not necessary
anymore, remove it as well.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-11-28 15:09:42 +01:00
Christian Dresel a2400a6e67 packages/fff: Add package fff-web-mqtt
With this package the mqtt settings can be configured over the webui.

Each user can use its own mqtt broker or a broker from another user.
This means that the user has a free choice of where to send or get data.

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:42:14 +01:00
Christian Dresel 9090702580 packages/fff: Add package fff-mqtt-monitoring
This package allows to publish monitoring data from alfred
to the mqtt broker.

Anyone can access this data and can build its own monitoring.

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:42:14 +01:00
Christian Dresel 7afe5fd767 packages/fff: Add package fff-mqtt
This package provides mosquitto and default settings.

mosquitto is used for mqtt communication.
With mqtt we can use a distributed mqtt broker for decentralized
communication.

We can use this for monitoring data or router configuration.

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:42:14 +01:00
Johannes Kimmel eb4dcf6585 fff-dhcp: PKG_RELEASE bump
Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
2021-11-10 13:42:14 +01:00
Johannes Kimmel 7afe817f7d fff-dhcp: add fallback dns server
If the user did not specify a dns server, set a fallback.  Since we
already have multiple servers available on an anycast address, this
address is chosen instead of as specific server.  This should avoid the
issue that the default server might deprecate suddenly.

A warning is still displayed to remind the user to conscientiously
choose a server and not rely on defaults.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:42:14 +01:00
Johannes Kimmel 7fd6b40225 fff-dhcp: remove unused dns server entries
These entries are overwritten by any call to `configuregateway`.
Since they never get used, they should be removed.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:42:14 +01:00
Robert Langhammer f8645e494f fff-firewall: Flush all installed tables.
With this patch all installed tables are flushed.
We no longer have to worry about the modules
installed or not. (nat, mangle ...)

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:42:14 +01:00
Fabian Bläse 09450bc4b5 Unify package URL in fff-packages
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-11-10 13:42:03 +01:00
Fabian Bläse 98898659ce fff-network: Add temporary workaround for dsa bridge configuration
If the bridge created for DSA devices is configured without any members,
a single netifd reload is currently not sufficient to correctly apply
network settings. This is due to a bug in netifd (FS#4104).

Temporarily add a simple workaround by always configuring the bridge,
even if it does not have any member ports.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2021-11-10 13:29:14 +01:00
Fabian Bläse 984e334adb layer3-config: Add dsa migration script
Due to the switch from swconfig to DSA, the switchport names have to be
migrated for some devices. Add a script to translate the switchport
names to their DSA equivalents, where applicable.

Fixes: #156

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:28:50 +01:00
Fabian Bläse 341d215cf2 layer3-config: Bump required config_version
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-11-10 13:28:05 +01:00
Fabian Bläse e76a8581d0 Add currently pending patch to fix dsa bridge in bridge configs
This patch fixes the forwarding behavior of bridge in bridge
configurations with DSA.

Without it, the configuration of the upper bridge might overwrite
settings of the lower bridge. For example, a vlan-aware bridge
with DSA interfaces in it might be offloaded to the DSA hardware. If the
bridge interface itself gets slave of a different bridge without vlan
filtering, the vlan filtering setting of the lower bridge is overwritten
by the upper bridge, which results in an incorrect hardware
configuration.

This was backported from kernel 5.7.

Ref: https://github.com/openwrt/openwrt/pull/4493
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2021-10-24 16:38:48 +02:00
Fabian Bläse 0a790b13bf OpenWrt: bump to v21.02.0
Bump core, packages and routing.

Refresh patches.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2021-09-02 17:10:48 +02:00
Fabian Bläse cf0290ad82 Add support for AVM FritzBox 4040
Since the ipq40xx ethernet driver has built-in handling for a few vlan
ids, this target requires a driver patch that disables this
functionality, so all vlan ids can be handled by the linux kernel.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-09-02 17:08:17 +02:00
Fabian Bläse e07f6121cc fff-layer3-config: add router_ip option
For some purposes (e.g. SNAT, vxlan) it might be necessary to have an
additional address just for the router which is not attached to any
interfaces. Addresses like this are typically added to the loopback
interface.

The new options "router_ip" and "router_ip6" are added to the gateway
config to allow the user to configure such addresses. It is possible to
both specify the address with or without a subnet size.

The default configuration contains the IPv4 loopback address
(127.0.0.1/8) explicitly, but this is not necessary. These addresses are
configured automatically, even if they are not present in the
configuration, so they can safely be removed, if present.

The filters of our routing daemon babeld are adjusted accordingly, so
the newly added addresses are announced correctly.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2021-09-02 17:05:32 +02:00
Fabian Bläse 5509ae287e Add support for Xiaomi Mi Router 4A (100m)
This currently includes a patch to add the label-mac alias in the
devices DTS file, which is also submitted upstream.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-09-02 17:04:49 +02:00
Fabian Bläse 256ac6a6c6 Add support for Xiaomi Mi Router 4A (Gigabit Edition)
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-09-02 17:04:35 +02:00
Fabian Bläse ffd00a93a7 fff-layer3-config: Disable SIGHUP during test mode
The SIGHUP signal is sent to a process if a hangup is detected on the
controlling terminal. This might happen if the ssh session, from which
the test mode was started, is disconnected.

Because ssh session disconnects might happen due to network
reconfiguration, aborting the test mode without restoring the old
settings might make the device unreachable.

Instead, disable the SIGHUP signal when test mode is activated, so
the script is either killed by the user (after successful configuration)
or the timer expires and the old settings are restored.

Fixes: #141

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2021-09-02 17:04:02 +02:00
Fabian Bläse ec94095599 fff-babeld: remove obsolete first_table_number
The IPv4 source routing features was removed from babeld with version
1.10. Therefore, the first_table_number option is not needed anymore and
its existance stops babeld from starting up.

As babeld 1.10 is included with OpenWrt 21.02, which is currently used
for our firmware, this option is removed.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2021-09-02 17:03:42 +02:00
Fabian Bläse 5dd9d6cea8 fff-wireguard: Add missing include for get_mac_label
The OpenWrt function get_mac_label resides in /lib/functions/system.sh,
so it has to be included, if we want to use this function.

This include was missing in the fff-wireguard layer3 configuration
script, so it is added here.

Fixes: 68c7d75a1b ("treewide: exploit label MAC address from OpenWrt")

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2021-09-02 17:03:20 +02:00
Fabian Bläse 44c3328eb4 fff-network: add packet_steering option to enable RPS
Receive packet steering (RPS) is a linux feature to improve forwarding
performance by distributing the forwarding of packets across multiple
cpus. This is necessary for network devices which have less queues than
cpu cores.

OpenWrt allows to enable RPS easily by setting the global option
'packet_steering' in the network configuration. With earlier OpenWrt
versions this option was enabled by default. However, the default value
was changed with OpenWrt 21.02.

Enable this option agian to improve forwarding performance on routers
with multiple cpu cores.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2021-09-02 17:02:59 +02:00
Fabian Bläse f880ba5e5b Add support for Ubiquiti EdgeRouter 4
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2021-09-02 17:02:18 +02:00
Fabian Bläse 55d03264d0 fff-network: use DSA network configuration for devices with DSA drivers
Some devices had to be disabled starting with OpenWrt 21.02 due to their
new DSA switch drivers.

As support for DSA configuration has since been added to fff-network,
this makes use of this configuration for devices with DSA drivers.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:44 +02:00
Fabian Bläse 15d259b98a fff-network: add support for DSA switch configuration
Starting with OpenWrt 21.02 some devices now use upstream kernel drivers
for the built-in switch instead of relying on OpenWrt's swconfig driver.

The upstream kernel drivers use the Distributed Switch Architecture
(DSA) for configuration of the switch. Instead of explicitly configuring
the hardware switch, all ports appear as distinct interfaces and linux
bridges are offloaded to the hardware switch if possible.

To keep changes small, this patch adds support for DSA devices by
setting up a linux bridge, which is then treated just like the
cpuport-interface of the swconfig driver.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:39 +02:00
Robert Langhammer c569a9a4b5 tools/dep-tree: fix broken tool
With commit 1946aaca87 the variantselection has changed.
This adapts dep-tree to the new situation.

Additional:
* The variant can now passed by as an option.
* A help text is added.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:38 +02:00
Fabian Bläse 08626f9e96 buildscript: fix fetch step
git pull combines two steps: fetch and merge. When checking out
another revision into an existing build directory, git pull tries to merge
the changes from the new revision into the current HEAD, before checking
out the new revision with git checkout. Because we apply various patches
to OpenWrt, the merge step almost certainly fails, so the new revision
is not checked out.

As the merge isn't needed anyway, use git fetch instead, which only
fetches updates from the remote without actually applying them.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:36 +02:00
Robert Langhammer 68ec1a616b treewide: colorize command ip
It is hard to read non colorized ip output.
This adds an alias to colorize ip by default.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:17:27 +02:00
Fabian Bläse d252d5110a fff-network: Add comments to set sysctls
To make it clear why the set sysctls are necessary, add appropriate
comments to them. Also reorder them for improved readability.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:17:17 +02:00
Fabian Bläse 5d5eb29518 fff-network: Remove obsolete and unnecessary sysctls
Many of the set sysctls are either unnecessary, are already default in
the kernel or in OpenWrts defaults, or the reason for them being
explicitly set is unknown.

Remove all those sysctls from fff-network, as unfounded deviations from
default values will cause hard-to-debug problems in the future.

The original motivation for this patch is the netdev_max_backlog sysctl,
which was set to a very low value without any reason or comment.
This hurt forwarding performance on mt7621 with DSA significantly and
took quite a while to discover.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:16:55 +02:00
Fabian Bläse 50e7d6a238 buildscript: exit on errors
Exit on errors, to make unsuccessful runs more obvious.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:44 +02:00
Fabian Bläse 2090c9124b buildscript: Use fff OpenWrt mirror
Use the git.freifunk-franken.de OpenWrt mirror for OpenWrt itsel and
OpenWrt feeds to reduce upstream traffic.

This is especially important since a clean build currently requires
a fresh clone of all repositories.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:17 +02:00
Adrian Schmutzler 6e9685048b OpenWrt: bump to v21.02.0-rc3
Bump core, packages and routing.

Refresh patches.

This includes babeld 1.10.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:13 +02:00
Adrian Schmutzler e39e986a59 fff-network: adapt support for TP-Link CPE210/510 v1
This migrates the support for the TP-Link CPE210 v1 and CPE510 v1
so they are recognized by the new two-port setup code.

Assignment of ports should be consistent to the ar71xx implementation,
i.e. primary port (PoE in) assigned to WAN and secondary port (PoE out)
assigned to CLIENT by default.
Note that this is the exact opposite of the default configuration of
what OpenWrt does (but both have been consistent in behavior).

Since they work again, also re-enable image transfer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:12 +02:00
Adrian Schmutzler 950dcd1f1c fff-network: improve "-n" vs. "-z" test in configurenetwork
Simplify a single test.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:11 +02:00
Adrian Schmutzler c22032e254 fff-network: support native two-port devices
Support native two-port devices by adding TWO_PORT variable and
exploiting the LAN0PORT and LAN1PORT variables designed for the
TP-Link CPE devices. Since the latter have been converted to
real two-port devices, we can now repurpose these variable for
the new setup.

This exploits the existing WANDEV and SWITCHDEV variables to
define the primary and secondary interfaces.

Note that by default this takes the initial values from network.mode,
so if initial WAN/CLIENT should swapped, this has to be added to
the relevant network.* file of the devices.

No device-specific changes are done in this patch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:10 +02:00
Adrian Schmutzler 47db8d31be fff-network: fix code flow for one-port devices in configurenetwork
So far, all one-port devices also triggered the switch-based setup
in configurenetwork, as the one-port condition was not checked
there. While the relevant parts are overwritten by the one-port
config which comes later in the script, it still creates a lot
of useless/broken switch/vlan setup entries in /etc/config/network.

Properly check for one-port vs. non-one-port in the file, without
touching anything else.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:07 +02:00
Fabian Bläse 8702fdd823 fff-sysupgrade: Keep ed25519 and ecdsa host key on system upgrade
Dropbear supports ed25519 keys since OpenWrt 21.02.
Also, ecdsa is supported since v19.07, but disabled in our firmware.

Keep the generated ed25519 and ecdsa host key accross upgrades.

While at it, remove dss host keys, as they are not supported anymore.

5eb7864aadd5 ("dropbear: rewrite init script startup logic to handle both host key files")
8a7a93947004 ("dropbear: remove generation and configuration of DSS keys")

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-20 20:23:58 +02:00
Fabian Bläse 649886223f fff-wireguard: Adapt for renamed OpenWrt wireguard packages
Because wireguard is part of the Linux kernel starting with version 5.6,
the wireguard packages have been renamed upstream.

Update our dependencies to match this.

This fixes build for the layer3 variant.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[add fix comment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-20 20:01:18 +02:00
Adrian Schmutzler ccdec069ef bsp: disable broken MT7621 devices
OpenWrt 21.02 has switched all MT7621 devices to DSA. Since we
do not support network config in this case, disable all these
devices by commenting out their image selectors.

Note that this will still build them, and only prevent having the
images in our dedicated folder.

If support is reestablished, this patch simply needs to be
reverted.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-08 20:26:01 +02:00
Adrian Schmutzler c5c6ac8ce4 bsp: disable broken TP-Link CPE210/CPE510 v1
OpenWrt 21.02 only uses ath79, ar71xx has been dropped. However,
in ath79 the TP-Link CPE210 v1 and CPE510 v1 are implemented as
two-port devices. We currently do not support that in our firmware.

Thus, disable both devices by commenting out their image selectors.

Note that this will still build them, and only prevent having the
images in our dedicated folder.

If support is reestablished, this patch simply needs to be
reverted.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-08 20:21:22 +02:00
Adrian Schmutzler 54ec8f8e3b bsp: update mpc85xx subtarget from generic to p1010
The subtarget has been renamed upstream, so let's just update our
stuff.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:15:33 +02:00
Adrian Schmutzler a79bdf7594 ath79: implement both versions of ubnt,bullet-m
The Bullet M (XM) was sold with two different SoCs, AR7241 and
AR7240, which cannot be served by one DTS. This implements both
versions as done in OpenWrt.

Note that those variants may not be distinguished from the outside.
The AR7241 version appears to be the more recent and more abundant
version.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:15:30 +02:00
Adrian Schmutzler aafd9edd1d OpenWrt: mac80211: add back ath10k_pci memory hacks
These hacks have been removed in OpenWrt commit 1e27befe63ff ("mac80211:
remove ath10k_pci memory hacks").

However, since we still use mainline ath10k, we will need them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:12:46 +02:00
Adrian Schmutzler 9c1f750a95 OpenWrt: remove libustream and certs from default packages
This effectively reverts upstream commit e79df3516d3e ("build: add
libustream and certs to default pkgs").

The libustream-wolfssl library conflicts with the libustream-mbedtls
we are selecting in fff-web-ui and is probably much bigger.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:08:58 +02:00
Adrian Schmutzler 68c7d75a1b treewide: exploit label MAC address from OpenWrt
In the latest release, OpenWrt provides the label MAC address for
many devices. All of our devices should be covered.

In can be retrieved by the function

  get_mac_label

from /lib/functions/system.sh

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:08:20 +02:00
Adrian Schmutzler e850e221db treewide: update names for OpenWrt 20.xx
Some devices were renamed since the last stable release.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:01:54 +02:00
Adrian Schmutzler 66dce0cf3a OpenWrt: bump to v21.02.0-rc1
Bump core, packages and routing.

Refresh patches, remove upstreamed ones.

The patch "Add batman-adv patch to remove gw mode switch message" is
removed since batman-adv dropped the sysfs entirely. There was no
obvious replacement for the debug output, so this is dropped until
the problem is found again with a different source (which may never
happen).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:01:44 +02:00
Adrian Schmutzler 858930547b treewide: use SPDX license identifiers
The SPDX license identifier provides a standardized way for specifying
licenses that is both human- and machine-readable. It is used upstream
both in OpenWrt and the Linux kernel.

Replace licenses in our repository by those identifiers.

The full-text licenses corresponding to these identifiers are
provided in the LICENSES folder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:53:26 +01:00
Adrian Schmutzler b856007098 buildscript: remove obsolete template rewrite
We do not use any *.tpl files anymore, so remove the routine for
installing them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:41:38 +01:00
Adrian Schmutzler 0c83c0e820 buildscript: do not overwrite build directory on prepare
So far, we remove the old and copy a fresh new OpenWrt directory
into the build directory on prepare. There is no need to do this,
as OpenWrt/Make is capable of detecting changes and we do properly
update the feeds and patches already.

So, just clone the OpenWrt main repo into builddir directly, and
just checkout/apply patches during prepare.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:40:36 +01:00
Adrian Schmutzler ec0586bdf6 OpenWrt: bump to 19.07.7
Bump main repo, packages and routing.

Refresh patches, drop patch applied to mt76.

Relevant changes are mostly security fixes for netifd and odhcp6c
and bug fixes for dnsmasq.

More information:
https://openwrt.org/releases/19.07/notes-19.07.7

This also includes two non-trivial fixes to alfred (openwrt-routing):

97e760095578 ("alfred: Fix procd process handling for disable state")
369908cb0a0e ("alfred: Start up alfred without valid interfaces")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-03-02 13:03:16 +01:00
Adrian Schmutzler 934ddab8e5 fff-nodewatcher: add config option to disable nodewatcher
This adds an option 'disabled' that will allow to disable
nodewatcher when desired.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-27 16:13:56 +01:00
Adrian Schmutzler cdf444651f fff-nodewatcher: specify config file as config file
This package is the owner of the config file, so add it to the
Makefile. This will have vanilla OpenWrt copy it during upgrade.

Since we disable this mechanism, it will not change anything for
our standard firmware. But it will improve the situation if this
package is used in vanilla OpenWrt.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-27 16:12:02 +01:00
Adrian Schmutzler 0475fe01f0 fff-nodewatcher: only run uci-defaults once
If /etc/config/nodewatcher already exists, a proper uci-defaults
script should not overwrite it. Since this package is the owner
of the config file, this change won't change anything for the
current firmware, but will allow to use this as a package, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-27 16:10:26 +01:00
Adrian Schmutzler 40f26d74a7 fff-nodewatcher: consolidate uci-defaults scripts
The uci-defaults scripts are meant to provide defaults for a
specific package. Distributing them across several packages makes
no sense and just makes maintainance worse.

Thus, move the network part of the initialization back to the
proper package. While at it, suppress output from add commands.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-27 16:09:22 +01:00
Robert Langhammer 811fdac32d fff-firewall: Add ipv4 ssh connection limit
With commit [1] the ipv4 firewall on wan interface was removed.
This patch adds the ssh connection limit for ipv4.
IPv6 is already limited.

[1] 52e15e072c ("fff-firewall: Remove ssh firewall on WAN interface")

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[improve commit reference]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-27 14:48:10 +01:00
Robert Langhammer b98ba27690 tools: Fix buildscript-bash-completion
The dynamic completion of the variants is broken since 1946aaca87
("fff: create proper package variants instead of copying file").
This hardcodes the available variants. They won't change often.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
[add more verbose commit reference]
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-27 14:45:31 +01:00
Robert Langhammer 990862419c fff-alfred-monitoring-proxy: remove ebtables entry
Removes the firewall ebtables entry.
alfred-monitoring-proxy is only useful in layer3 variant, where no
ebtables rules are set.
With this typo the ebtables command was never active and the
resulting error was never shown.

Fixes: 9b5d3f1aeb ("fff-alfred-monitoring-proxy: add package")

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
[fix typos in message, add Fixes:]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-27 14:29:50 +01:00
Adrian Schmutzler 51d3858ed4 fff-network: remove broken include for Ubiquiti UniFi AC Mesh
In '/etc/network.ubnt,unifiac-mesh', we include a file that does
not exist on ath79 anymore. This causes the script execution to
abort and will have configurenetwork not run at all, making the
device quite inaccessible.

Remove the include as it never had any use anyway. Remove another
unused include as well, and add the proper dependency instead.

This fix was first proposed more than 2.5 years ago.

Fixes: #130 (gitea)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-02-26 20:48:22 +01:00
Adrian Schmutzler 1158e0bb24 fff-nodewatcher: add available memory to data
The "available" amount of memory is helpful for several forensic
and debugging cases. Send it via alfred.

Monitoring support has already been implemented.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-02-26 20:48:05 +01:00
Fabian Bläse 3147a33c52 fff-network: Disable source address filtering
Source address filtering (RFC3704) can be used to mitigate source
address spoofing. However, strict mode only works when routes are
strictly symmetric. If routes are asymmetric, it can happen that
the best route to the source address of a packet is via a different
interface.

Because there is no guarantee that routes have to be symmetric in the
Freifunk Franken backbone network, we cannot use strict mode. Because
default routes are used in the Freifunk Franken backone, loose mode
could be used, but does not make any sense. Instead, revert back to the
kernel default setting, which currently is 0 (disabled).

While this change affects both layer3 and node variant, nothing changes
for the node firmware, because it does not forward packets.

Fixes: #123

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2021-02-18 23:20:30 +01:00
Fabian Bläse 764556b980 fff-network: Create separate interface for wan dhcp
Previously, an additional wan6 interface for SLAAC has been added, which
references the wan interface for its interface.
However, OpenWrt waits until the wan interface is completely up, until
it tries to start up interfaces that depend on it.

This not only can delay the configuration of IPv6 addresses
significantly, but also makes configuration of the wan6 interface
impossible in WAN networks with out a DHCP server.

To solve this issue, a separate interface wan4 for dhcp, which also
reference the wan interface, is created and the proto of wan is set to
none.

Fixes: #114
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-18 23:19:27 +01:00
Adrian Schmutzler 539406d96b fff-network: fix primary port for Nanostation M
Migration from ar71xx to ath79 included changes to the ethernet/switch
driver for the target. This introduced a peculiar issue where
eth0 and eth1 are swapped for several devices. Most of the relevant
cases were already covered in 1cf4d762ff ("treewide: move devices
from ar71xx to ath79").

This switch also affects the Nanostation M, where the PoE-in port
is now eth1 und the PoE-out port is eth0. However, no action was
taken in the referenced patch, as nobody was aware of it then.

Since the Nanostation M is a two-port device, which we cannot
implement properly so far, it was implemented as a one-port with
the "primary" PoE-in port so far. This was broken by the ath79
introduction and is now fixed in this patch by using the one-port
setup on eth1. That way, the PoE-in port can now be switched by
ETHMODE as usual again.

Note that custom scripts, e.g. to set up the second port, need to
be adjusted manually, as that one is eth0 now.

Fixes: 1cf4d762ff ("treewide: move devices from ar71xx to ath79")
Fixes: #109 (gitea)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-02-18 01:19:24 +01:00
Adrian Schmutzler bd15c7e178 fff-network: don't hardcode eth0 for one-ports in configurenetwork
We use the one-port implementation also on two-ports like the
Nanostation M. Therefore, hard-coding eth0 in configurenetwork
will break if the port implemented for the one-port setup
(SWITCHDEV/WANDEV) is not eth0.

Just use SWITCHDEV instead, like done for the rest of the one-port
setup.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-02-18 01:19:06 +01:00
Fabian Bläse 0927a4e51a bsp: Allow for arguments in passwd function
Previously, we have added a passwd function to our shell which executes
passwd and restarts uhttpd afterwards, so the WebUI password is updated.

This adds the ability to still pass command-line arguments to passwd.

The quoting of the shell variable $@ is special:
"$@" expands to "$1" "$2" .., so its use is correct here.

Fixes: #117

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-18 01:17:10 +01:00
Adrian Schmutzler fcb19bd233 buildscript: remove unneeded global download directory link
Some time ago, the firmware created a directory for each target
and built OpenWrt separately there. In this situation, it made
sense to download files only once and share them between these
build directories.

However, since we nowadays only have one build directory for all
targets, this makes no sense anymore. Remove the link.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-09 23:01:30 +01:00
Adrian Schmutzler 597ecdc244 fff-dhcp: fix indexing and output in uci-defaults
When creating a new uci section, the safest way to refer to it is
with index '-1'. While it (probably) does not make a functional
difference for our specific case, since we expect to only have one
section anyway, let's just make sure and use the proper indexing.

While at it, suppress output from the 'add' command.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-09 22:59:18 +01:00
Adrian Schmutzler 1946aaca87 fff: create proper package variants instead of copying file
So far, we ensure the selection of a specific variant by copying
included Make files. This not only breaks if the packages are used
as a feed, but also is against the concept of how packages are used.

In this patch, the fff package is converted into a set of variants
that allow selection via a FFF_VARIANT variable that is exported by
buildscript. If no export happens, e.g. when using packages in a
feed, no package is selected.

Since the names fff-node and fff-layer3 are not available anymore,
the packages for the variants are called (though irrelevant for
the user):

  * fff-variant-layer3
  * fff-variant-node

The only drawback is that we now have to specify the list of
available variants in the buildscript. However, these values are
hardcoded in several other places as well, and the former code
based on file names was not really appealing anyway.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-09 22:54:05 +01:00
Fabian Bläse 31866435a1 fff-layer3-config: Add script to set wan vlan/interface
Allow setting WAN vlan/interface from gateway config.
A configuration without explicit definition of a WAN interface is
valid at the moment and results in the default configuration from
fff-network being used.

Originally, it was intended to automatically set WAN to vlan 2, if nothing was
specified. As this would break devices, which don't use swconfig for
WAN, the already configured WAN interface is left untouched.

Fixes: #85 (gitea)
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-09 22:46:58 +01:00
Adrian Schmutzler 6ff350fcf9 fff-network: wrap CPUPORT into a function
Instead of exposing the CPUPORT variable to the calling script
directly, wrap it into a function which can be called there.

Fixes: #52 (gitea)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-09 22:38:55 +01:00
Adrian Schmutzler cb4bce7cc2 fff-network: move PORTORDER to function/library
So far, we define PORTORDER individually in each network.* file.
This creates a lot of duplications, and makes the code to parse those
values very ugly (and it's only used outside of configurenetwork
anyway).

Therefore, move the assignment to a library file, and wrap it into
a function for tidyness. This gives us more overview and nicer
implementation of the retrieval.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-09 22:37:20 +01:00
Fabian Bläse 37695a1cfc fff-network: Add migration for Archer C7 WAN ports
With 8d66bdf the port configuration of TP-Link Archer C7 has been
changed to a single-interface configuration.

This had unforseen side effects on upgraded devices. Because WANDEV
is evaluated from the updated network.* file, the port configuration
of the switch is evaluated from the update-safe network.config, which
is now incompatible with the updated interface configuration.

Therefore, a migration script has to be added, which updates the port
configuration in network.config to the new single-interface network
configuration.

Fixes: #60 (gitea)
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-01-31 14:11:14 +01:00
Fabian Bläse afe633e874 fff-hoods: Allow correct ula_prefix syntax in hoodfiles
In earlier firmware versions the prefix had to be written
in an incorrect syntax (missing a trailing colon).
To make hoodfiles with this old incorrect syntax work with
newer firmware versions like this one, we have to fix the
incorrect syntax. Both the old, incorrect and the correct
syntax work with this fix, so in the far away future, the
correct syntax can be used in hoodfiles.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-31 14:08:09 +01:00
Adrian Schmutzler ae1ed11cd9 Revert "fff-babeld: Add rule to lookup in fff table for everything except wireguard"
This reverts commit e5da228cb1.

With the patch there can be situations with just "*" in traceroute,
breaking MTU in wireguard. If R1 with IPv6 address from provider P1
is connected to Freifunk via wireguard, and another R2 with address
from provider P2 is behind it, then R1 won't answer to traceroutes
sent from R2.

Revert the patch for now.

Fixes: #66 (gitea)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-01-31 14:05:26 +01:00
Adrian Schmutzler e3954fddf5 packages/fff: drop redundant PKG_BUILD_DIR
PKG_BUILD_DIR has the following default values set in include/package.mk,
in case no BUILD_VARIANT is set:

With PKG_VERSION set: $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
Without PKG_VERSION:  $(BUILD_DIR)/$(PKG_NAME)

Consequently, all PKG_BUILD_DIR definitions in our packages are
redundant. Remove them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-01-27 20:22:02 +01:00
Adrian Schmutzler 95c8ee78b7 fff-ra: remove IPv4 support of odhcpd
We do not use the IPv4 functionality of odhcpd, but use dnsmasq
for that. Use odhcpd-ipv6only instead.

This is also the default for OpenWrt.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2021-01-27 19:58:07 +01:00
Fabian Bläse a79b453de1 fff-random: Use strtol to parse numbers
Other than atoi, strtol allows to detect parsing errors.
Therefore atoi is replaced with strtol and appropriate error
checks are added.

Fixes: #33 (gitea)

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2021-01-27 19:55:00 +01:00
Robert Langhammer 1146a81a64 treewide: Update webui password on password change
If the password is changed via SSH, the web UI still
used the old password until uhttpd is restart.

Fix it by forcing uhttpd restart when passwd is called.

Fixes: #11 (gitea)

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[add commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-27 19:49:03 +01:00
Adrian Schmutzler 0092713196 treewide: replace IP string manipulation by owipcalc tool
The owipcalc tool provides an "add" algorithm which can be used
to concateneted IPv6 addresses from prefix and suffix.

Since it's available upstream and our string manipulation is ugly,
let's replace our IP concatenation with that tool. The package
consists of a single .c file with about 1000 lines resulting in
about 4 kB for the ipk package.

This patch does _not_ introduce any conceptual changes yet. Thus,
the "wrong" IPv6 prefix from KeyXchange will be expected in the
same format, it is just healed for the new code for now.

The change allows to get rid of some bloat, i.e. some quite trivial
custom functions on the way. This also drops the ipTidyColon()
function, as owipcalc seems to return the collapsed version by default.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-01-27 19:44:07 +01:00
Fabian Bläse f8b93325f2 fff-firewall: Remove variables not used by procd
The variables SERVICE_WRITE_PID and SERVICE_DAEMONIZE are not used by
procd, so they are removed.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-27 19:36:51 +01:00
Robert Langhammer 3eb744e491 fff-firewall: Restart when network configuration changes
The configuration of our firewall depends on the network configuration.
Most importantly, the firewall has to be restarted, if the WAN-interface
is changed.

Therefore, a procd reload trigger is added to the init-script, so our
firewall is automatically restarted, when the network configuration is
changed.

Fixes: #46 (gitea)

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
[fabian@blaese.de: Remove unrelated changes]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-27 19:31:55 +01:00
Fabian Bläse aea773a2a9 fff-web-ui: Allow ampersand (&) in passwords
Fixes: #51 (gitea)

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-01-27 19:26:11 +01:00
Fabian Bläse 30cdaf6e54 fff-network: Remove sysctls that depend on disabled kernel features
Some sysctls currently are completely useless, as they only exist if
specific kernel configurations are enabled, which we have not.

To hide the error message and prevent them from interfering
unintentionally, if new kernel configurations are activated in the
future, they are removed.

Fixes: #42 (gitea)

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2021-01-27 19:21:55 +01:00
Fabian Bläse 39df9ba501 fff-network: Remove relocated netfilter sysctls
The net.ipv4.netfilter.ip* sysctls have been moved to
net.netfilter.nf* a long time ago, so they have been useless in our
firmware for quite a while.

It probably originally has been added because it was included in the
OpenWrt defaults and in earlier versions of our firmware the OpenWrt
defaults file got overwritten by our own one.

Because there does not seem to be any obvious reason to keep them (they
have been added without a comment in the commit or file) and they have
been inactive ever since they were moved in the kernel, they are removed
completely instead of using the correct path.

Fixes: #42 (gitea)

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2021-01-27 19:21:46 +01:00
Adrian Schmutzler 1189833757 OpenWrt: bump to 19.07.6
Bump main repo and packages. (No changes for routing.)

Refresh patches (no diff returned).

This is a small release containing mostly kernel and package updates
and security fixes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-01-27 18:36:15 +01:00
Johannes Kimmel f6c1e4da52 vxlan: backport vxlan patches to 19.07.5
vxlan support in 19.07.5 is very limited.

This set of patches adds
  - more flexible source ip selection
  - control over most options
  - multiple remote endpoint configuration

List of patches backported:
  - 5222aadbf3 vxlan: remove mandatory peeraddr
  - 65e9de3c33 vxlan: add capability for multiple fdb entries
  - 036221ce5a vxlan: add extra config options
  - ad3044c424 vxlan: fix rsc config option
  - 3f5619f259 vxlan: allow for dynamic source ip selection (FS#3426)
  - a3c033e2af netifd: vxlan: handle srcport range
  - 226566b967 netifd: vxlan: refactor mapping of boolean attrs
  - 11223f5550 netifd: vxlan: add most missing boolean options
  - 55a7b6b7f2 netifd: vxlan: add aging and maxaddress options

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[refresh patches and remove some bloat]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-19 16:19:48 +01:00
Adrian Schmutzler 352b95acd9 README.md: remove 'realpath' from dependencies
The package 'realpath' isn't available anymore on Debian 10, it is
part of coreutils now.

Reported-by: Felix Luber <Felix.Luber@servercreator.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-19 15:51:38 +01:00
Adrian Schmutzler a39ee47811 buildscript: reorganize user-defined variables
The only part that is changed regularly inside buildscript are
the OpenWrt and package revisions and the selected packages.

Move them up and put them into dedicated variables so it is more
obvious what to change and easier to do so.

While at it, remove outdated COMPAT_VERSION comment from Gluon
package; we don't pull it from there anyway. Update comment on
feed definition syntax as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-01-19 15:48:53 +01:00
Fabian Bläse be4c1fe689 fff-layer3: Add cake scheduler kernel module
The cake scheduler is a popular fair queuing scheduler, which is also
capable of shaping traffic. Due to its sensible defaults it is very
easy to set up.

When tunnel traffic exceeds the capability of the transport connection,
firmware users might want to shape traffic, so meaningful queueing can be done
before tunnel packets are dropped. As this is typically combined with a fair
scheduler, cake provides a simple yet very powerful solution for both problems.

Therefore the cake kernel module is now included in the layer3 variant.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2021-01-13 22:05:12 +01:00
Fabian Bläse 33d65836fe fff-babeld: Clarify warning about missing ipv4 peering address
When neither peer_ip nor ipaddr are set, no ipv4 address for peering
interfaces is available. Therefore, no IPv4 routes can be advertised.

Other than that, a configuration like this is perfectly valid and
configuration is already continued. Therefore, the "FATAL" message might
be misleading so it is replaced with "WARNING" and clarified slightly.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-13 22:05:00 +01:00
Johannes Kimmel 6e5a6073b8 buildscript: count available cpus with nproc
Grepping `/proc/cpuinfo` does not yield the correct number of available
cpus when running in a docker container or setting the number of
available cpus with taskset.

```
$ taskset 1 grep -c processor /proc/cpuinfo
8
$ taskset 1 nproc
1
```

This will prevent using too many build jobs on environments where the
number of available cpus is reduced.

`nproc` is part of `coreutils`.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-01-13 21:44:51 +01:00
Christian Dresel 5469399112 fff-layer3-config: Make it easier to keep the settings in testmode
On call -t we write the pid on /tmp/configure-layer3-pid.
If the script exits from user we use trap to run the new function keep_changes()
If the connections to the router lost, the user	can run	configure-layer3 -k after
reconnect to keep changes manually

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[wrap and rephrase exit comment, bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-28 17:42:15 +01:00
Fabian Bläse 6fe053bcf7 fff-layer3-config: Autoconfigure layer3 router after update
This adds a script to init.d to automatically call
the appropriate configure-layer3 commands after an upgrade,
so the configuration of the device is restored.

The changes are applied if configure-layer3 is successful.
Otherwise, they are reverted. Due to this, no additional checks for
the configuration are necessary: The configure-layer3 script
will fail if the config version is wrong or no configuration exists at all.

After executing the script destroys itself. With START=99,
the execution happens _after_ uci-defaults and configurenetwork,
and no interference is expected.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
[convert to init.d, extend commit message, rebase]
Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-28 17:34:03 +01:00
Adrian Schmutzler 4f76367b5a fff-web-hood: create directory /www/hood via Makefile
Creating a directory via a .keep subfile is not really nice.

Use the OpenWrt mechanism for this instead.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2020-12-22 14:11:10 +01:00
Adrian Schmutzler def42fadde fff-web: rename to fff-web-ui
The former fff-web package is essentially for serving a user
interface (UI). Therefore, include the UI in the name to distinguish
it from other web packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2020-12-22 14:10:16 +01:00
Adrian Schmutzler 341d5cc57d fff-web-hood: separate package for hood file via HTTP
There might be scenarios where a user only needs the hood file,
but no WebUI (e.g. for 4M devices and node firmware), or only
the WebUI, but no hood file (e.g. layer3 firmware).

This separates the HTTP server (section) for the hood file into a
separate package fff-web-hood. The new package is then only added
to the node firmware.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2020-12-22 14:05:19 +01:00
Adrian Schmutzler b69469a0b9 packages/fff: remove unneeded Build/Prepare and Build/Configure
Build/Prepare and Build/Configure are not required for packages
which only contain local files and do not need any compilation.

Remove them.

Note that Build/Compile needs to be present and empty to overwrite
the defaults, though.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-12-22 13:47:45 +01:00
Adrian Schmutzler 3214388680 treewide: rename br-mesh to br-client
The name br-mesh is actually quite misleading, since the bridge
actually includes the "client" interfaces. In order to make this
obvious, and to prevent confusion with the properly named wXmesh
interfaces, rename them to br-client.

Note that br-mesh is also particularly disturbing for the layer 3
firmware without batman-adv.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-12-22 13:41:44 +01:00
Adrian Schmutzler 7e552761f6 packages/fff: rename fff-gateway to fff-layer3
The term "gateway" is ambiguous, and we are using "layer 3" for this
flavor now. Reflect that in the package name as well.

This is cosmetic otherwise.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2020-12-17 15:38:28 +01:00
Adrian Schmutzler f9a68be465 packages/fff: move config scripts to fff-layer3-config
configuregateway and it's gateway.d files represent a specific
functionality that other packages depend on. Thus, it is put into
a package of its own so dependencies can be expressed more properly.

While at, use the chance to get rid of the ambiguous term "gateway"
and rename the script to configure-layer3 and the folders to layer3.d.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2020-12-17 15:38:20 +01:00
Christian Dresel e5da228cb1 fff-babeld: Add rule to lookup in fff table for everything except wireguard
With this patch the router answers in traceroute over the fff table with
Freifunk IPs and not with the WAN IP. All other connections use the fff
table too.

We already have the rules with 5000 and 5001 so that wireguard does not use
the fff table anyway and connect the VPN only via the main table.

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Acked-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-12-16 17:53:56 +01:00
Adrian Schmutzler 31df0a3779 packages/fff: remove whitespace from package TITLE
Some packages contain a whitespace at the start of TITLE, some
don't. This is completely irrelevant since Make strips leading
and trailing spaces anyway. Nevertheless, make it consistent.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-12-13 14:40:53 +01:00
Felix Luber 2484d8defb README.md: explain more commands from buildscript
Signed-off-by: Felix Luber <Felix.Luber@servercreator.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-13 14:39:56 +01:00
Felix Luber 87c420c4a0 README.md: remove unnecessary empty lines
Signed-off-by: Felix Luber <Felix.Luber@servercreator.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-13 14:38:30 +01:00
Felix Luber 939950a881 README.md: change git url to new gitea host
Signed-off-by: Felix Luber <Felix.Luber@servercreator.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-13 14:37:34 +01:00
Christian Dresel da50954db7 fff-web: Make ssl menu modular
To add new menu items in other packages we need a modular construction:
- Simpel Babelweb
- Layer 3 configuration
and so on

Every menu item needs a file in /www/menu/ssl/ with the content

  link,name

  - link is the name of the html file without extension (.html)
  - name is the text of the link in the webui

While at it, rename "Password" menu item to German "Passwort".

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
[bump PKG_RELEASE, use /www/menu, use script_file for link,
improve use of class_active, commit message adjustments,
improve variable names, keep HTML umlaut, keep Logout]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-12 21:14:42 +01:00
Adrian Schmutzler d4e6482b60 fff-web: remove included files from HTTP-accessible folder
Certain files are only included, but are not meant to be accessed
via HTTP directly. Move those to a dedicated directory that is not
served via HTTP.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2020-12-12 21:12:35 +01:00
Adrian Schmutzler 8fe7512ae5 ramips/mt76x8: Add support for TP-Link Archer C50 v4
Add support for the TP-Link Archer C50 v4, a low-cost mt7628-based
dual-band router.

Label MAC address is on ethernet and 2.4 GHz WiFi.

The v4 uses the same hardware as the v3 variant, but v4 includes
the newer split uboot.

ATTENTION:

Initial flashing of this device requires additional steps:

As all installation methods require an U-Boot to be integrated into the
image (and we do not ship one with the image) we are not able to create
an image in our build-process.

Download a TP-Link image from their Website and a FFF/OpenWRT sysupgrade
image for the device and build yourself a factory image like following:

TP-Link image:             tpl.bin
OpenWRT sysupgrade image:  owrt.bin

 > dd if=tpl.bin of=boot.bin bs=131584 count=1
 > cat owrt.bin >> boot.bin

This image can be used for Web-UI and recovery, but not TFTP.

Additional instruction can be found in the OpenWrt commit
01dcd574a248 ("ramips: add support for Archer C50 v4")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-12-09 13:10:09 +01:00
Adrian Schmutzler 87d875cd94 build_patches: add fix for 2.4 GHz on Archer C50 v4
Fixes low signal issue for 2.4 GHz for the TP-Link Archer C50 v4.
The first two bytes in the eeprom are the chip id. The working
devices have 0x7628 there, whereas the non-working devices have
0x7600 there. This chip id gets checked by the function
mt7603_check_eeprom() which leads the driver to ignore the
contents of the eeprom partition and load default values from otp.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-12-09 13:10:01 +01:00
Adrian Schmutzler b5b0557f13 OpenWrt: bump to 19.07.5
Bump main repo, packages and routing repos.

Refresh patches, drop upstreamed ones.

Relevant highlights (v19.07.4 -> v19.07.5):
- fix WAN disconnect issues on ath79
- fix 2.4 GHz MAC address for Unifi AC devices
- use correct firmware for Unifi AP

Relevant highlights (v19.07.3 -> v19.07.4):
- add wpad-basic-wolfssl package
- add support for CPE210 v3.2
- vxlan UDP checksum fix
- squashfs: Fix compile with GCC 10

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-12-09 13:08:26 +01:00
Fabian Bläse 52e15e072c fff-firewall: Remove ssh firewall on WAN interface
This firewall was introduced as a countermeasure for very slow routers
directly connected to the internet without any firewall.

Our routers have got quite a bit faster since then. Also, a setup like
this is highly uncommon, especially for slower routers.

Therefore this firewall rule is removed.

Fixes: #138
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-15 13:05:49 +02:00
Fabian Bläse c91e2d03ec fff-gateway: Send ICMP errors using inbound ifaddr
When using NATs and tunnels at the same time, the correct
source address has to be used so the ICMP errors is sent
through the NAT. This is necessary so the NAT can modify
the ICMP payload so it is correctly identified by the
destination host, which is required for PMTUD

Fixes: #142
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-15 13:05:49 +02:00
Adrian Schmutzler 24be8ecdda fff-network: fix unintended wan=eth1 for two-port devices
For historic reasons, the wan interface is set to eth1 as default
value. When updating the config for one-port devices in
configurenetwork, the same value is put there again if the mode
is switched to something != WAN, instead of just removing the
value.

While ifname actually is a mandatory value, this has been handled
inconsistently in the past, where ethmesh ifname was deleted, and
wan ifname was just changed back to eth1, when assigning the
actually relevant eth0 to a different task.

This concept was set up with a one-port device in mind, i.e. a
device where there is no eth1. However, this very setup routine
got applied to the Nanostation M as well (which is treated as
as one-port), where we suddenly have two interfaces and the eth1
exists.
So, while the user assumes it's unconfigured, the second port
actually becomes set up as WAN if the first one is != WAN.
If connected to a second device with CLIENT (=default) to provide
PoE there, this will create a loop.

So, finally, in order to somehow fix this mess, this patch just
changes the hardcoded "eth1" to "eth2". While this is no proper
fix, it perpetuates the original idea of keeping wan set to
something, but nothing which actually exists. However, there are
no sideeffects and we keep this minimal-invasive.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-09-15 13:05:49 +02:00
Adrian Schmutzler 30c3b46127 fff-network: fix broken statement in configurenetwork
This seems to be a copy/paste error, what we want here is to
delete the entry from ethmesh, as we use WAN.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-09-15 13:05:49 +02:00
Fabian Bläse cbf22d8eca fff-gateway: Add tc and bmon
Users might want to manually set up proper scheduling or qos using tc.
bmon can be used to monitor current throughput and packet rates.

Both are now included in layer3 variant.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-09-15 13:05:49 +02:00
Fabian Eppig 1cae99d5d5 ath79/generic: add support for TP-Link WR710N v1
Flashing instructions:

The factory image needs to be uploaded via the OEM firmware GUI.

Notes:

The device is implemented as two-port in OpenWrt, i.e. it has
eth0/eth1 interfaces without switch setup. As our firmware currently
does not support that, this uses a switch setup with one port for
LAN.

Signed-off-by: Fabian Eppig <fabian@eppig.de>
[add commit message, apply alphetic sorting in bsp, remove config
changes apart from adding CONFIG_TARGET_DEVICE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-18 17:27:20 +02:00
Adrian Schmutzler f5872dd84b fff-hoods: fix/simplify condition in configurehood
What was intended as grouping of logic operators actually invoked
a subshell. Remove the subshell by using a better choice of operators.

Found by shellcheck.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-08-01 12:10:18 +02:00
Adrian Schmutzler a157f413d4 fff-hoods: let sha256sum read file directly
This removes two useless cat as found by shellcheck:

  sumnew=$(cat "$hoodfiletmp" 2>/dev/null | sha256sum | cut -f1 -d " ")
               ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

While not functionally relevant in our case, note that

  cat <non-existant-file> | sha256sum

actually returns a hash code, while

  sha256sum <non-existant-file>

does not return anything on stdout.

Since we check the existance of $hoodfiletmp before calling sha256sum,
though, we always have a hash value for at least one file, so two empty
checksum won't happen at that point.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-08-01 12:09:44 +02:00
Fabian Bläse b5563caa23 fff-network: Improve IPv6 WAN connectivity
Until now, IPv6 connectivity was only ensured by some custom sysctls.
OpenWrt has a proper way of enabling IPv6 client (SLAAC, as well as DHCPv6)
for an interface. Switching to OpenWrt's way of configuring client addresses
for an interface might also make configuration more reliable, as the appropriate
sysctls are now set by netifd. Especially OnePort and TwoPort devices will
benefit from this change, as IPv6 auto configuration does not have to be manually
enabled and disabled for a physical interface, but rather is set as an option for
our logical wan interface.

At the same time this change enables DHCPv6 client support for WAN.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-01 01:09:10 +02:00
Fabian Bläse c23c98b2cb fff-hoods: create hoodfile AP earlier
The hidden AP creation is moved to the end of
configurehood, so it is executed right after hoodfile
changes are processed.

When keeping the long sleep before trying to gather hoodfiles
via wireless or ethernet, this should decrease the delay after
hood changes to a minimum, as mesh nodes don't have to wait
until configurehood on VPN nodes is executed a second time.

Because hoodfiles gathered via wireless or ethernet are not
copied to hoodfilewww (which is used to deliver the active
hoodfile via ethernet or wireless), only authoritative hoodfiles
(keyxchange and gateway) trigger the creation of a hidden AP.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-01 01:07:57 +02:00
Fabian Bläse 0264cc48b3 fff-hoods: Improve hoodfile gathering logic
Instead of seperately checking for various conditions,
which don't actually guarantee that the hoodfile can be
fetched in a certain way (e.g. internet is available but
keyxchange is down), the already built in return value of
the hoodfile gathering functions is utilized.

This change slightly changes the behaviour of nodes in
certian edge cases:
- If no hoodfile could be fetched from keyxchange, the
  next delivery method (getGatewayHoodfile) is used
- If the gateway is unable to deliver a hoodfile, nodes
  now behave like the gateway is unreachable, instead of
  continuing to use old hoodfiles

These behaviour changes should be an improvement over the
previous behaviour:
- VPN nodes don't disconnect and break the whole network
  if the keyxchange is unreachable, but instead try to
  fetch the hoodfile from the gateway
- Instead of checking for batman gateway announcements,
  which are completely unrelated to hoodfile delivery using
  fe80::1, the actual status of the hoodfile download is
  utilized. This has two effects:
  - hoodfile delivery using fe80::1 works even if batmans
    gateway selection isn't used at all
  - if the batman gateway selection is active, but fe80::1
    hoodfile delivery is broken in the hood, the nodes disconnect
    from the hood and try to gather their hoodfile from nerby
    nodes. Previously they continued to use the old hoodfile.
    This should make misconfigured gateways more apparent.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-01 00:59:41 +02:00
Adrian Schmutzler 065a6ac354 build_patches: add support for TP-Link CPE210 v3.20
This adds new strings to the support list for the TP-Link CPE210 v3
that are supposed to work with the existing setup.

Without it, the factory image won't be accepted by the vendor UI on
these newer revisions.

This has been merged upstream in commit 4a2380a1e778.

Backport to 19.07 is planned already, so the patch can be removed
again when we move to the next point release.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2020-07-31 20:46:39 +02:00
Adrian Schmutzler 2e3da1556c build_patches: add updates for vxlan support
This adds a few improvements and fixes for vxlan support.

The following two patches are already backported to openwrt-1907 and
can be dropped after bumping to the next point release:

0011-vxlan-fix-udp-checksum-control.patch
0012-vxlan-bump-and-change-to-PKG_RELEASE.patch

The other two patches won't be backported and have to be kept until
we move up to 20.xx:

0013-vxlan-remove-mandatory-peeraddr.patch
0014-vxlan-add-capability-for-multiple-fdb-entries.patch

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Tested-by: Johannes Kimmel <fff@bareminimum.eu>
2020-07-31 20:41:21 +02:00
Fabian Bläse ce4146cf4a mt7621: Add support for Netgear R6220
The factory image can either be flashed via the vendor WebUI or
the bootloader using nmrpflash.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-20 14:30:39 +02:00
Fabian Bläse b886c938dc fff-gateway: Add mtr package
mtr can be a very helpful tool when debugging unstable
networks. The tool is able to list packet loss to all
routers to a destination in a nice console-based interface.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-07-14 13:54:46 +02:00
Fabian Bläse 906add6efa README: Adjust some build instructions for recent changes to our firmware
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-06 10:14:20 +02:00
Adrian Schmutzler de8f99005c fff-hoods/fff-web: create link to hood file in fff-hoods
For the layer-3 firmware, we currently do not support a hood file
for automatically creating a mesh. However, the link for the
hood file is still created in fff-web.

Move this setup to fff-hoods, which is specific to the node firmware.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-06-18 13:05:49 +02:00
Fabian Bläse 1faaec432a fff-network: Group network files by arch, not by target
OpenWrt only builds and installs a packet for each architecture.
If a package is already fully built and installed for a architecture,
it is not rebuilt.

Because we have two different BSPs building two different targets (BOARDs)
using the same architecture (ath79 and ar71xx, mips), the fff-network package
is not reinstalled when switching between those.

However, we have defined an install step, which copies the necessary network
files seperated by board. But because the package is not rebuilt when switching
targets, the wrong network files might be present in the package.

To resolve this issue, the network files are now seperated by ARCH instead of
the target (i.e. the BOARD variable).

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Robert Langhammer <rlanghammer@web.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:47:05 +02:00
Adrian Schmutzler 1cf4d762ff treewide: move devices from ar71xx to ath79
This patch moves device support for ar71xx devices that are supported
in ath79. Building them with ath79 will be the new default.

The only devices remaining in ar71xx will be the following, as backporting
them to openwrt-19.07 is too complicated:
- cpe210-v1
- cpe510-v1

Accordingly, no tiny devices are left in ar71xx and we can drop the relevant
patches, and build ar71xx as generic again.

For the tl-wr741nd-v2, in ath79 the tplink_tl-wr741-v1 image is used.

The move from ar71xx to ath79 requires some adjustments on the way:
- The board names and image names on ath79 contain the vendor name,
  where the former have it separated by a comma (tplink,cpe210-v2)
  and the latter use an underscore (tplink_cpe210-v2). It is
  safe to assume that this is the only difference between board and
  image names.
  Consequently, the ath79 devices will use their full board name also
  in our firmware. A lot of renames in fff-boardname can be dropped.
  The rename for fff-sysupgrade is already present in fff-upgrade.sh
  While at it, fix that for the WDR4900 v1 as well.
- Due to a different switch driver, the startup of ethernet devices
  is altered, which leads to eth0 and eth1 being swapped for some ath79
  devices compared to ar71xx. This has been adjusted for SWITCHDEV/WANDEV
  and MAC address setup.
- Since we have direct support for the AC Mesh now, use the proper
  name instead of the AC Lite image. For Ubiquiti, different device
  variants are now available as separate images.
- Remove left-over power-m-xw entry in cpuport file

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2020-06-18 12:41:03 +02:00
Fabian Bläse 823bcd774a build_patches: backport fix for squashfs build with gcc 10
This patch is already included in the openwrt-19.07 branch,
so our backport can be removed when upgrading to or past
OpenWrt 19.07.4.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:29:33 +02:00
Fabian Bläse 328beebe32 fff-wireguard: Use babel type wired for wireguard babel peers
The babel interface type 'tunnel' has some disadvantageous properties for
our network.

First, babel tries to evaluate the tunnel performance using the rtt. However,
this makes the network quite unstable, as rtt might fluctuate a lot, especially
on less reliable connections (e.g. LTE). Instead of fully falling back to an alternate
route, this rtt evaluation leads to a lot of flapping routes. Additionally, rtt
evaluation changes the metric of routes quite often, which leads to many unnessessary
babel messages in our network.

Also, babeld disables split-horizon processing on 'tunnel' interfaces per default.
However, split-horizon processing can be done in our point-to-point tunnel setup without
any issues and has the advantage of significantly reduced babel messages on a link with
many uplink routes.

Therefore, wireguard babel peers now use the interface type 'wired'.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[bump PKG_RELEASE, adjust commit title prefix]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:24:40 +02:00
Fabian Bläse 9d000c96e0 alfred-proxy: Make curl silent
As we now log output of cron scripts to syslog, the debug
output of curl spams the rather short-lived syslog. As this
debug output is unessesary most of the time, it now is disabled.

Instead, curl's silent option is used, together with '-S', which
reenables error output.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:22:22 +02:00
Fabian Bläse 5cd46fb17b fff-hoods: Remove hardcoded IPv4 address and foreign domain
IPv4 is not a requirement for VPN nodes. However, a working DNS
is a requirement for nodes connecting via VPN. Therefore the
hardcoded IPv4 address is removed from the internet test.

To improve readability, a loop is used instead of having a seperate
ping command for each host. The ping utility built into our firmware
supports both IPv4 and IPv6.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:04:07 +02:00
Adrian Schmutzler 225116dfd2 OpenWrt: bump to 19.07.3
Bump main repo, packages and routing repos.

Refresh patches, drop upstreamed ones.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-06-18 11:58:54 +02:00
Fabian Bläse 65f2af1ced fff-hoods: Add missing dependencies
The configurehood script unconditionally sources various
libraries from other packages, which previously have not
been included in the fff-hoods package dependencies.

Add the missing dependencies to fff-network, fff-wireless,
fff-timeserver and jshn.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-05 13:45:04 +02:00
Adrian Schmutzler d237fe5598 fff-timeserver: remove -q from uci and drop unused library source
Do not suppress errors from uci command without a reason.

While at it, remove unused sourcing of library. This is a left-over
from the transition to KeyXchangeV2.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:44:30 +02:00
Adrian Schmutzler 5e4339e954 fff-alfred-proxy: remove uci -q and execute bit for uci-defaults
Do not suppress errors from uci command without a reason.

Despite, remove executable bit for sourced file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:43:45 +02:00
Adrian Schmutzler 7a54c56531 fff-gateway: Use return for errors in config version check
The concept of configuregateway is to respond on the return codes
of the gateway.d files, and exit if anyone returns something different
than zero.

Thus, let's not exit in gateway.d files directly, but stick to that
logic and return 1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:42:42 +02:00
Adrian Schmutzler 6d91d805a7 fff-gateway: improve order of commands for config version check
Move retrieval of config version, as it makes sense to check for
existance of containing file beforehand.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:42:19 +02:00
Adrian Schmutzler 4791c24608 fff-gateway: explicitly return status code 0 for version check
We check the return code in configuregateway, so let's give success
explicitly. This might not be strictly necessary now, but providing
it will make our lifes easier if the file is changed later.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:41:53 +02:00
Adrian Schmutzler 2f9e5f4af1 fff-gateway: provide specific error if config version is not set
This explicitly checks whether the config version is set at all,
instead of just comparing it, and provides a specific error message
for that case.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:41:10 +02:00
Adrian Schmutzler f8ced0cc04 fff-gateway: suppress unwanted error for config existance check
We provide our own error message, so suppress the built-in one.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:40:18 +02:00
Fabian Bläse f7c5f949f7 ath10k: Increase buffer to fix >1500 MTU frames
The ath10k seems to have an issue with large frames
transmitted over 802.11s. This issue has been worked around
in ath10k-ct. The same patch has now been merged into OpenWrt.

As this might fix mesh issues with ath10k devices, it is backported
to our firmware using a build patch.

Link: 066ec97167
Link: https://github.com/greearb/ath10k-ct/issues/89
Link: 9e5ab25027

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-01 17:48:06 +02:00
Fabian Bläse eac8292dba fff-macnock: update to latest revision
This updates the macnocker to a newer revision,
which moves 'interface not running' log messages to
log_trace, so it only appears when the highest debugging
level is activated.

Fixes: #139
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-05-01 17:47:25 +02:00
Adrian Schmutzler d649151399 fff-network: set correct CPUPORT for new mt76x8 devices
When adding support for the TP-Link Archer C50 v3 and TL-WR841N v13,
their CPU port provided for layer-3 setup has not been set correctly.

Do it now.

Fixes: d165915178 ("ramips/mt76x8: Add support for TP-Link Archer C50 v3")
Fixes: 9343153547 ("ramips/mt76x8: Add support for TP-Link TL-WR841N v13")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-01 17:47:18 +02:00
Fabian Bläse b9fe20c8e7 fff-macnock: Update to latest revision
This updates the macnocker to a newer revision, which
fixes log spamming if the batman interface is not running.

Fixes: #104
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler 173ce577ae fff-macnock: clean up package variables
This removes unnecessary package variables and rearranges the
remaining ones based on the common style in OpenWrt trunk.

In particular, this drops PKG_VERSION in favor of PKG_SOURCE_DATE,
since it does not seem reasonable to tag a version every time we
want to pull it. Despite, while we effectively pull via the
variable PKG_SOURCE_VERSION anyway, the PKG_VERSION might even
have hidden changes if not properly adjusted.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler 776cfe9f86 treewide: add "exit 0" for uci-defaults files
uci-defaults scripts are supposed to be run once after firstboot
and then removed. However, the removal only takes place if the
subshell created for the sourced scripts returns exit code 0.

For some of the files, the last command returned a different exit
code, though, leading to the script remaining in its location and
being executed for every boot.

To prevent cases like the latter, this adds an "exit 0" to all
uci-defaults files in our package store. While at it, remove the
shebang for all these files since they are sourced (and not
executed).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler 961c4da648 packages/micrond: show stdout and stderr in log
So far, all output created by scripts run with micrond has been
discarded. Since there is no reason for that and it also does not
match the expected behavior, this enables both stdout and stderr
output for the service.

If not desired, a user can still use >/dev/null or similar in his/her
micrond jobs to disable output easily and similar to what it would be
on other systems.

For our firmware, this will mean that all micrond script will now
start to spam logread.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler da6013ec97 fff-simple-tc: provide status via nodewatcher
Add traffic control status and rates to alfred data, which is also
available for the Monitoring then.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Fabian Bläse ed73e00588 babeld: Update babeld to 1.9.2
babeld is updated to 1.9.2 using a feed patch.
The new version includes fixes a few minor issues.

With babeld 1.9.2 a fix for IPv4 xroutes has been
introduced. Therefore, our own patch isn't necessary anymore,
so it is removed.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 12:00:17 +02:00
Fabian Bläse c7e9f514a5 nodewatcher: Only report batman_adv version if installed
The version of batman_adv is read in a script inside fff-nodewatcher,
so it is possible that batman_adv is not installed.

Therefore, a new test is added to check if batman_adv is installed,
before reading and reporting its version.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 12:00:17 +02:00
Fabian Bläse f26463628b nodewatcher: Exit nodewatcher if subscript fails
If a subscript exits with an exit status != 0, its output should not
be used. Because sending incomplete data sets might result in weird
edge cases, the nodewatcher is terminated and the output of other
subscripts is discarded.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 12:00:11 +02:00
Fabian Bläse 25c5edcf3c nodewatcher: Add prefix to debug messages
Because nodewatcher is executed using a cron, but
our cron has no way to report the origin of a specific
log entry, a 'nodewatcher:' prefix is added to all debug
output.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 11:56:28 +02:00
Fabian Bläse 2eb675790e nodewatcher.d: Remove $(date) from debug output
Debug output is written to stderr now.
Therefore the output is happening in real time and
the current date and time are not necessary anymore.

Typically the date and time are added by the syslog
daemon.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 11:56:19 +02:00
Fabian Bläse c1f694c319 nodewatcher: Output to stderr instead of log file
Maintaining a logfile manually is complicated and
has no major improvements over just logging to stderr,
because nodewatcher is no deamon and can be run manually
for debugging purposes.

Also, the debug output from subscripts currently is not
written to the log file anyway and the debug level is not
used eiher.

Therefore, the file logging and debug level is removed
from nodewatcher, which simplifies the code a bit.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 11:56:01 +02:00
Adrian Schmutzler 6c947f8c91 fff-hoods: Replace wifi command with reload_config
If wireless config has changed, reload_config will automatically
adjust wireless interfaces.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler a8f7dce6fc vpn-select: indent contents of make_config function
This is a purely cosmetic change to enhance the readability
of the function.

Also add some empty lines and comments for overview.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler 91808ad710 nodewatcher: Use Makefile version for nodewatcher data
So far, nodewatcher version has to be specified twice, once in the
Makefile and again in the nodewatcher script.

With this patch, a version file is created during build than can
be read in nodewatcher script, so version only has to be specified
once anymore. The file name mimics the version files already present
for OpenWrt and our firmware.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler 498c6ad963 fff-nodewatcher: Consolidate code in nodewatcher.d/10-systemdata.sh
This consolidates the code in nodewatcher.d/10-systemdata.sh by:

- Slightly reordering data retrieval
- Moving XML node assembly to corresponding data retrieval, making
  the whole file easier to read
- Changing some if statements to shorter binary condition shortcuts
- Reduce the number of variables by merging some code into the XML
  node assembly

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler 18e00a4e70 nodewatcher.d: Tiny cosmetic improvements
This applies some tiny improvements to just-moved nodewatcher.d code:

- Remove comments about obvious things
- Introduce newlines to make code easier to read
- Use shorter conditional syntax for easy cases

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler 1c3243dd18 fff-nodewatcher: Tidy up uci-defaults script
This solves the following issues with the uci-defaults script in
fff-nodewatcher:

- Remove /bin/sh in non-executable file
- Only commit to changed config
- Use "-1" for uci node indexing, as this will be the node just
  created

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Tim Niemeyer b6c7acd704 nodewatcher: split into nodewatcher.d scripts for individual task
This splits up the data extraction/assembly of the nodewatcher
script into several parts and distributes them across packages, so
that each nodewatcher.d subscript is located in the package providing
the relevant functionality. This allows to extend the nodewatcher data
by enabling/disabling packages.
This scheme is not perfectly fulfilled for fff-network vs. fff-wireless,
as data cannot uniquely assigned there and the XML syntax does not allow
separation anyway.

In general, this moves code without applying code improvements, yielding
at an easy comparison of moved fragments. However, the following changes
were done to improve experience:

- The function writing debug output has been renamed from "err" to "debug"
- Since we catch the stdout of the nodewatcher.d functions anyway,
  those scripts were adjusted to echo output directly instead of first
  writing it into a variable and then outputting it at the end.
- The uci config has been kept, but initialization for the network part
  has been moved to the fff-network package.
- Space indent has been changed to tab, which is more common in the
  firmware and requires less space.
- Remove support for nodewatcher run without uci config. Script-based
  nodewatcher on other platforms will have altered code anyway, and
  splitting it up will prevent effective use as a blueprint for those
  cases. After this change, nodewatcher in firmware is supposed to be
  used only for this firmware.

Note that since the nodewatcher.d scripts are evaluated by using their
echo output, having a function created uncaught output to stdout there
will corrupt the XML.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
[rebase and adjustments for current master, use simpler mechanism to
call nodewatcher.d scripts, use tab indent, remove debug() definition
where not needed, do not remove uci config, add commit message, use
echo -n]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[remove 'local' modifier for variable not inside a function, fix typo]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Fabian Bläse 9957cd4318 fff-gateway: make uci query for vlan ports quiet
The user might create a vlan without any ports.
This setup lead to "uci: Entry not found" error messages,
while still working as intended.

The '-q' flag is added to the corresponding uci query to
hide this error. While this isn't strictly necessary, the
uci subcommand is quoted to bring it in line with the other
subcommands.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-17 17:08:16 +02:00
Adrian Schmutzler 12422a5ea4 buildscript: check selected_bsp link target
While buildscript checks whether selected_bsp exists, it does not
verify whether it is pointing to a sensible direction.

Since we use the target file name and content to derive build folders
etc., though, this patch adds a check and exits the script if the
link is broken.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 17:05:08 +02:00
Fabian Bläse 5e37a2e9ba buildscript: clean feeds before updating them
When installing feed packages that already have been installed
from a different feed, OpenWrts feeds script does not change
the feed, but keeps the already installed package.

Therefore, packages are not updated to the correct feed on
updatefeeds, when the package is moved to a different feed
in our buildscript.

The update_feeds function already contains code to clean the already
installed feeds, but only removes the symlinks to the feed directory.
OpenWrts package installation directory (packages/feeds/*) is not
removed, however.

The 'clean' command of the scripts/feeds script properly cleans up
both directories. Hence, the 'rm' command is replaced with it.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-17 17:04:58 +02:00
Adrian Schmutzler 9b90dcb98e buildscript: update gluon packages repository
Our checkout of the Gluon packages is from 2017. This uses a recent
version which pulls in some improvements for simple-tc.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:50:09 +02:00
Adrian Schmutzler 958f9d09ca buildscript: use micrond from official package repo
micrond has been accepted into the official OpenWrt package repo
and is available in the openwrt-19.07 stable branch. Use this
source instead of the Gluon packages.

During merge, a few fixes/adjustments were made, including transfer
to procd.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:50:02 +02:00
Adrian Schmutzler 311bc8fc0f buildscript: remove kmod-batman-adv-legacy from package list
We do not use this package anymore, so remove it from package
selector as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:49:51 +02:00
Fabian Bläse 11ab5f15a7 bsp: autogenerate machine variable from filename
Because we nowadays only use bsp files as a wrapper for
OpenWrt targets, the machine variable got obsolete.
It's only use today is to locate the configuration folder for
a specific bsp.

Instead of explicitly defining this variable, it is now generated
from the filename of the bsp.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-17 15:49:46 +02:00
Johannes Kimmel a16800c683 fff-gateway: add vxlan package
This adds vxlan support to facilitate testing future uses for vxlan.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-15 16:21:29 +02:00
Fabian Bläse 1a86626f17 bsp: Rename files to include subtarget
Because we might want to support different subtargets
inside a single target in the future, the name is changed
so it includes the subtarget as well.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-15 16:13:50 +02:00
Dominik Heidler 9343153547 ramips/mt76x8: Add support for TP-Link TL-WR841N v13
Flashing instructions:

The image can only be flashed via TFTP, not via WebUI.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "...-tftp-recovery.bin" to "tp_recovery.bin" and place
   it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

ref: 24043a0d2e

Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[add commit message, rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-15 16:08:44 +02:00
Fabian Bläse d165915178 ramips/mt76x8: Add support for TP-Link Archer C50 v3
This adds support for the TP-Link Archer C50 v3 and adds the
necessary mt76x8 (sub-)target to our firmare.

Flashing instructions:

The image can only be flashed via TFTP, not via WebUI.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "...-tftp-recovery.bin" to "tp_recovery.bin" and place it
   in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

ref: 14951e8f8e

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[extend commit title and add commit message, rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-15 16:08:28 +02:00
Adrian Schmutzler 157ddf2bc9 buildscript: copy all squashfs images for one device
So far, we are selecting specific squashfs images to be copied
from openwrt bin folder to our "final" bin directory. This has
the disadvantage that additional image types/names have to be
added explicitly, bloating the relevant code in buildscript.

With this patch, this behavior is changed in order to copy all
squashfs images for a particular device. To achieve that, the
image names in the bsp files are changed to contain a wildcard
that will be evaluated in buildscript.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-15 15:59:28 +02:00
Adrian Schmutzler 873dd49d99 bsp: rename mpc85xx target according to common scheme
So far, the bsp for the mpc85xx target has been named "wdr4900" since
this device was the only one built from it.

Since all other files use the target name, though, use the target
name for mpc85xx as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-15 15:56:51 +02:00
Adrian Schmutzler 6a39109fec bsp: harmonize settings across targets
This patch harmonizes the options in the OpenWrt .config files
across targets. Many of them have evolved somewhat independently,
and unifying them should make maintenance easier in the future.

The most important change is the consistent per-device build applied:
When building devices with OpenWrt, you have the option to either
build a default image for the (sub)target, an image for a single
device, or images for multiple devices. This is controlled by
CONFIG_TARGET_MULTI_PROFILE. In addition, the option
CONFIG_TARGET_PER_DEVICE_ROOTFS will toggle whether packages
are selected per-device or per-target.

When we build only a single device per target, setting these options
will only have minor effect. As soon as a second device is added
though, impact will be heavy, and devices may end up with no/wrong
packages.

Thus, this patch sets both options to "y" on all targets, which
essentially eliminates this problem for the future (and corresponds
to what the OpenWrt build bots do).

The only option not harmonized is the CONFIG_TARGET_SQUASHFS_BLOCK_SIZE.

All ath10k settings are target-dependent as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-02 13:08:55 +02:00
Adrian Schmutzler eb784bd0db fff-sysupgrade: replace comma by underscore in image file names
On modern targets in OpenWrt, the board name follows the
"vendor,model" syntax. Since commas in file names are uncommon
and ugly, file names use the same pattern with an underscore,
"vendor_model".

Since this also applies to image file names, this patch
adjusts fff-upgrade.sh to replace the comma from board name
by an underscore for all devices. This should be possible
without harm as OpenWrt images can safely be expected to
either contain a comma in the right place or no comma at all.

It has been discussed whether the same should be applied to
the network.* files as well. However, expecting those to
be removed in the foreseeable future does make this undesirable,
as a lot of code would be inserted now and be removed again a few
months later, only to fix the name for one device.

For the same reason, we won't touch the board name replace
for the TL-WDR4900 v1 for now.

Suggested-by: Fabian Bläse <fabian@blaese.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-02 13:07:26 +02:00
Adrian Schmutzler aca1223f06 bsp: use mainline/QCA driver and firmware for ath10k WiFi
OpenWrt offers two variants of ath10k driver and firmware, the
"normal" mainline/QCA variant and the "CT" variant [1]
developed as fork by Candela Technologies.
Both deviate from each other with respect to their feature set,
level of support and system impact (i.e. memory consumption).

Since the 19.07 release, OpenWrt has made the "CT" variant its
default for supporting (almost) all ath10k chips. [2]
However, for this firmware the CT driver/firmware introduces a number
of (potential) drawbacks:

- CT memory consumption seems to be higher. (This still needs to be
  verified for the new kmod-ath10k-ct-smallbuffers variant.) This
  is particularly a problem on several ath10k devices with 64 MB RAM,
  where the devices run into OOM regularly (i.e. C60 v1/v2). [3]
- Though CT has active support, it is still just a fork effectively
  maintained by one person.
- With CT driver/firmware there are frequent reports that the
  combination of AP and 802.11s is not working. [4] While this issue
  couldn't be reproduced in recent tests, it still is explicitly
  not supported, and there is no interest to change that at the
  moment. [5]

Due to these reasons, it seems more appropriate for us to use the
mainline/QCA variant of ath10k driver and firmwares. This patch
applies that to all affected devices.

Note that currently the mainline driver also benefits from a local
patch in OpenWrt that reduces the memory footprint. This patch has
been removed in master, so we will need to keep it locally when using
a 20.xx OpenWrt release. [6]

[1] https://github.com/greearb/ath10k-ct.git
[2] 61b5b4971e
[3] 1ac627024d
[4] https://github.com/freifunk-berlin/firmware/issues/696
    https://forum.openwrt.org/t/ath10k-ct-and-802-11s-mesh-not-working-on-archer-c7/13877
[5] https://github.com/openwrt/openwrt/pull/2341#issuecomment-580904873
[6] 1e27befe63

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2020-04-02 13:06:40 +02:00
Fabian Bläse 44e9376a37 kernel: Reduce memory usage by reducing squashfs fragment cache size
Reducing the amount of squashfs fragments cached in memory might reduce
memory usage, especially for systems with very little memory and
big squashfs blocksizes.

Because only ar71xx-tiny contains 32/4 (memory/flash) devices, the
reduction of the fragment cache is only applied to the ar71xx bsp.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-02 13:06:31 +02:00
Adrian Schmutzler be80e17c57 ar71xx: remove non-existant ubnt-power-m-xw
The ubnt-power-m-xw identifier was introduced in 0447d0c709
("fff-boardname: introduce new ubnt boards") assuming that the
Ubiquiti Powerbeam M2 XW had a separate model identifier in
/var/sysinfo/model (otherwise, it was derived from loco-m-xw image).

However, OpenWrt has never known about a PowerBeam device. Consequently,
on devices nothing changed, and all PowerBeam devices were still
recognized as Nanostation Loco M XW.

Thus, this patch removes all references to a ubnt-power-m-xw, as it's
never been working anyway.

Note that this also implies that any user of a PowerBeam would have
used the wrong antenna_gain values of the Loco M XW by default (and
will continue to do so).

However, actually the Loco M XW has never been tested or supported
officially for this firmware. The image was only used for the
support of the Powerbeam M2 XW in 68314ea943 ("Add support for
Powerbeam M2 XW"). However, since the firmware is expected to work
and seems to be installed on several devices already, we won't remove
the image for now.

For further reference:
The board and model names set in ar71xx are found in the OpenWrt file
target/linux/ar71xx/base-files/lib/ar71xx.sh

Fixes: 0447d0c709 ("fff-boardname: introduce new ubnt boards")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-31 23:35:40 +02:00
Christian Dresel e3df4720f8 fff-webui: show fastd public key in webui
User can see the fastd public key in the webui

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-30 11:57:15 +02:00
Fabian Bläse 3a845b541b Add support for Archer C2600
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-30 11:56:17 +02:00
Fabian Bläse d02ea69801 mt7621: adjust for new filenames in OpenWrt 19.07
The suffix for Edgerouter X (SFP) have been changed
from '.tar' to '.bin'. Therefore our BSP has to be adjusted
to copy the correct file path.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-22 20:17:28 +01:00
Adrian Schmutzler 4bb31a75f2 show_info: Treat case of missing simple-tc package
Suppress error in show_info when simple-tc is not built into the
firmware.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-22 20:01:12 +01:00
Adrian Schmutzler 93cebbf3f7 packages/fff: Add fff-simple-tc
This new packages is meant to serve as meta-package to store
setup for simple-tc.

This achieves two objectives:
- Increase general maintainability by having relevant code in one
  location.
- Provide the option to include/exclude simple-tc functionality
  just by selecting/deselecting the fff-simple-tc package.

This will allow for easier testing of image size impact of this
functionality, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-22 20:00:55 +01:00
Adrian Schmutzler aa0d237fa9 fff-network: apply upstream swap of MAC addresses for Archer C60
The ethernet MAC addresses of the Archer C60 v1/v2 were swapped
compared to the vendor assignment. This has been fixed in OpenWrt
after 19.07.2.

Apply this to our firmware already, so we cannot forget it later
and prevent having messed-up br-mesh MAC addresses.

The OpenWrt patches can be removed again when bumping to 19.07.3.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:56 +01:00
Adrian Schmutzler aa42a39ce2 fff-network: use static MAC address location for TL-WR1043ND v4
At the moment, the ETHMESHMAC for the TL-WR1043ND v4 is loaded from
the config partition. The data there is written by the stock firmware,
and thus is dependent on the version installed before and may even
vary in position.

Instead, this patch uses the product-info partition, which is not
modified by stock firmware.

While at it, update the sourced library files and the comment for
both v4 and v5.

ref: 53839da46e

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:55 +01:00
Adrian Schmutzler 73e227cdc8 fff-network: account for MAC address change of TL-WDR3600/43x0
In OpenWrt commit 27eea249213b ("ar71xx: fix MAC address setup for
TL-WDR4300 board") the LAN/WAN MAC addresses for the TL-WDR3600,
TL-WDR4300 and TL-WDR4310 were changed.

This creates an overlap of the LAN und 5 GHz MAC addresses, where
the first will also affect the BATMAN interface eth0.3.

To keep BATMAN interfaces with separate addresses, this patch will
set the ETHMESHMAC to eth0 +1, corresponding to the virtual WAN device
(VLAN 2) OpenWrt sets up (which we aren't using anyway).

ref: https://github.com/openwrt/openwrt/commit/27eea249213b04a372491009850926f9282d13

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:54 +01:00
Adrian Schmutzler 7614dc5584 fff-network: account for MAC address change of Archer C7 v2
In OpenWrt commit 8a21bc36229d ("ar71xx: fix MAC addresses for
Archer C5 v1, C7 v1/v2, WDR4900 v2") the WiFi MAC addresses for
the Archer C7 v2 were changed.

This creates an overlap of the LAN und 2.4 GHz MAC addresses, where
the first will also affect the BATMAN interface eth1.3.

To keep BATMAN interfaces with separate addresses, this patch will
set the ETHMESHMAC from eth0, corresponding to the separate WAN
device we are not using in our firmware anyway.

ref: https://github.com/openwrt/openwrt/commit/8a21bc36229d3eabad213ae47fddb4d86d76ac

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:53 +01:00
Adrian Schmutzler cabb8eca74 bsp: remove rssileds package for all devices
The rssileds package has never been working for our firmware, and
most probably there is no way to make it work with the current
frequent status changes of WiFi interfaces.

So, the package is just wasted space on the flash, particularly for
the "tiny" TP-Link WA850RE v1. Despite, it has a dependency on
libiwinfo, which we plan to remove as well.

Consequently, this patch removes the package for all devices. As the
package is selected per-device, we also have to remove it per-device.

The choice of devices is based on which of them includes the package
in OpenWrt 19.07.2.

The script for disabling rssileds is kept as well, as the manual
removal of the package is prone to have it overlooked for newly added
devices or when OpenWrt changes the setting for existing ones.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:52 +01:00
Fabian Bläse 7046d5b563 build: remove iwinfo and libiwinfo to save space
The iwinfo utility is not used anywhere, so it can be removed.
This saves an additional xy KiB of space in the compressed binary,
which allows building our firmware with OpenWRT 19.07.2 for
non-LZMA 4 MiB flash devices.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-03-15 22:04:49 +01:00
Fabian Bläse 0c3429f3fb fff-web: Use iw instead of iwinfo for wifiscan
This prepares the fff-web package for removal of the iwinfo binary.

Instead of using the 'iwinfo' wrapper, the nl80211 utility 'iw' is used
from now on, which is possible, because we only support devices with
nl80211 drivers anyway.

Because iw reports the frequency instead of the channel, and does not allow
easily parsing the mode and encryption parameters, the table is adjusted accordingly.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-03-15 22:04:48 +01:00
Fabian Bläse 99cd4f4027 ar71xx: Use OpenWRT default for squashfs blocksize
Previously, the squashfs blocksize has been increased to 512 bytes,
to increase compression efficiency, because the OpenWRT default blocksize
has been only 256 bytes.

Since OpenWRT 18.06 the blocksize has been increased to 1024 bytes for
devices with a small flash. Because increased blocksize gives us additional
headroom for devices with only 4 MiB flash, our own 512 byte override is removed.

The default blocksize for the other targets in our firmware is 256, which is lower
than our current override. Therefore it is not changed in this commit.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-03-15 22:04:47 +01:00
Fabian Bläse 2184d226ad Replace wpad-mini with hostapd-mini
A wpa_supplicant is not necessary for our firmware,
because it does not connect to encrypted WiFi networks.

Therefore it is possible to use the smaller hostapd-mini
instead of the combined wpad-mini packages.

Some user might use an unsupported setup, where an encrypted
wifi is used for wan uplink. This is not possible anymore.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-03-15 22:04:46 +01:00
Fabian Bläse fe6ae924aa fff-hoods: manually create wifi station interface
The mac80211 interface script in OpenWrt depends on wpa_supplicant
for the creation of station interfaces. While this is conveniant, it
isn't strictly necessary for connecting to unencrypted networks.

To be able to create station interfaces if wpa_supplicant is removed,
the station interface for obtaining the initial configuration is now
created using iw commands only.

This makes it possible to replace wpad-mini with hostapd-mini, which
does not include wpa_supplicant and therefore shrinks the uncompressed
binary by around 200KiB.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:04:45 +01:00
Adrian Schmutzler 5ebb60f0ef fff-batman-adv/-server: Remove KMOD for symbols
This follows the changes introduced in
6a25fd5ce5

This is a result of the switch to openwrt-19.07.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: Rebase onto fff firmware master]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:44 +01:00
Adrian Schmutzler 9f25f5dc35 batman-adv: Split batadv proto in meshif and hardif part
This migrates to the new configuration architecture introduced
and required in
54af5a209e

This is a side-effect of the switch to openwrt-19.07.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: Rebase onto fff firmware master]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:43 +01:00
Fabian Bläse 68f9bae58f bsp: Adjust configs for updated OpenWRT defaults
The bsp .config only contain configuration, which differs from
the OpenWRT defaults. With OpenWRT 19.07, some defaults were
changed, so overriding them isn't necessary anymore.

This includes the switch from ath10k to ath10k-ct, which is now
default in OpenWRT. Our previous setup used the ct driver, but the
non-ct firmware for some devices. All devices are now reverted to
the OpenWRT default, which uses the ct variant for both the firmware
and the driver. According to some reports, the ct driver breaks
802.11s mesh for some devices, therefore these changes should be tested
before release if possible.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:04:42 +01:00
Fabian Bläse 7ffb75633b build_patches: Rebase onto OpenWrt 19.07.2
Refresh patches for main repo, packages and routing.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:04:41 +01:00
Fabian Bläse c962c8465b buildscript: Move to OpenWrt 19.07.2
Bumped openwrt main repo, packages and routing to 19.07.2.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:03:46 +01:00
Adrian Schmutzler 47de26817b fff-wireless: always disable rssileds if package is installed
This always disables rssileds if the package is installed, and thus
saves us from specifying particular devices.

Since rssileds do not work with our concept of resetting WiFi
interfaces, we cannot use it anyway.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-01-18 19:50:54 +01:00
Christian Dresel 38d2a5a704 fastd: make secret key update-safe
To use a whitelist easily, it is necessary to make the fastd key
update-safe.
This patch saves the key to uci fff config and recovers it for
use after a firmware upgrade.

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: lemmi <lemmi@nerd2nerd.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[bump PKG_RELEASE, rephrase commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-01-10 14:31:58 +01:00
Adrian Schmutzler 1c014d04f4 fff-boardname: start uci-defaults script early
The WiFi configuration scripts have been moved to an earlier point
in initialization sequence in c39de8f7d5 ("fff-wireless: initialize
WiFi config before setting up wXsta"), which has them run before
the script setting board name in uci config files. Since the script
setting manual antenna gain and fixing rssileds depends on having a
board name, though, the move broke this functionality.

Since the board name set up script itself does not depend on anything
else in the uci-defaults scripts, let's move this one to a relatively
early point in initialization (and save us from touching anything
else).

Fixes: c39de8f7d5 ("fff-wireless: initialize WiFi config before setting up wXsta")
Fixes: #135

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-01-04 13:46:23 +01:00
Christian Dresel 08c210a309 gateway.d: use correct function name for apply hook
The configuregateway script calls only "apply" and not "commit".

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[commit title and message facelift, bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-12-30 15:18:14 +01:00
Robert Langhammer cbaea3ffe2 Add a README to folder tools.
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[fabian@blaese.de: Fix whitespace issues, introduce markdown code blocks, rename to README.md]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-12-24 12:52:05 +01:00
Robert Langhammer 4a159bc647 Add skript dep-tree.
This script collects all fff-package dependencies.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2019-12-24 12:52:05 +01:00
Fabian Bläse 99bce95f80 fff-wireless: Use previous HT/VHT mode instead of detecting capabilities
Previously the HT/VHT mode was detected using the output of iw phy. This
command erroneously used the $radio variable, which doesn't contain the
phy name. Therefore it doesn't work like it is supposed to.

As we don't completely configure the wifi-device sections, but only adjust
some of OpenWRTs default values, the HT/VHT detection can easily be done by
just checking if the previous mode did contain "VHT".

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-12-24 12:52:05 +01:00
Fabian Bläse 32740ed90c buildscript: Put binaries in seperate folders per variant.
To make it easier to find the correct binary, this creates
a seperate folder for every variant and copies the binaries
appropriately.

The folder is created with "-p" to suppress errors, if it already
exists. This means the misplaced creation of the "bin"-folder inside
the build function can be ommited.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-12-24 12:52:05 +01:00
Adrian Schmutzler 6a43b7dfdb fff-sysupgrade: move /etc/sysupgrade.sh to /sbin/fff-upgrade.sh
The old name "sysupgrade.sh" is easy to be confused with OpenWrt's
/sbin/sysupgrade. Rename our script to clearly indicate its
purpose.

While at it, move from /etc to /sbin, as the former is an odd location
for an executable script.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-12-14 12:08:03 +01:00
Robert Langhammer 5756f9b906 Add bash-completion for the buildscript.
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-12-10 10:22:46 +01:00
Fabian Bläse bcec4e6a20 bsp/ar71xx: Build ath10k-firmware-qca9888-ct as module
The qca9888-ct firmware is used as a device package for the
C60v1 and C60v2. It doesn't get built however, as it isn't selected
anywhere.

To be able to use the firmware, it is now configured to be built as a module.

Fixes: #129
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-12-10 10:03:30 +01:00
Fabian Bläse 30c7541e6f fff-network: Add portorder to Archer C7v2
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-12-10 10:02:26 +01:00
Fabian Bläse 8d66bdf35c fff-network: Only use one Switch Port on Archer C7v2
Previously the TP-Link Archer C7v2 was configured to use
two Switch CPU Interfaces. One for Trunk (Client + Batman), one
for WAN.

As this setup is very uncommon in our firmware at the moment and does interfere
with the automatic CPU Port setup in layer3 variant, it is converted to a single
trunk port setup just like all of the other routers with integrated managed switches.

As eth0 is now used as the switchport, this change would require to setup
a different ETHMESHMAC if mac addresses would be shared between interfaces.

The device does seems to have 4 discrete mac addresses however, so the
explicit ETHMESHMAC setting is completely removed instead.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-12-10 10:02:06 +01:00
Fabian Bläse d718d0faa9 fff-wireless: Set htmode to VHT for 802.11ac capable radios
To make use of MCS 8 and 9 which have been introduced with
802.11ac, htmode has to be set to VHTxx.

By checking if the radio supports it, the htmode is configured
to the appropriate HT/VHT setting.

Fixes: #130
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-12-10 10:01:39 +01:00
Adrian Schmutzler c39de8f7d5 fff-wireless: initialize WiFi config before setting up wXsta
The script for setting up wXsta (/etc/uci-defaults/24c-fff-wXsta) runs
before the main WiFi config script (/etc/uci-defaults/60-fff-wireless),
so the wXsta config is deleted again by

config_foreach removeWifiIface wifi-iface

This moves the latter script (and another script for WiFi config)
before the wXsta setup, so the WiFi config will be set up correctly.

Fixes: #128
Fixes: 3d9eb1db2e ("fff-hoods/fff-wireless: Reconfigure instead of
delete and create")
Reported-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-30 20:07:23 +01:00
Fabian Bläse 141f48389d fff-wireless: Hide errors if device doesn't have radios
Some output and exit status are hidden, as they are a valid behaviour
if the device doesn't have any radios.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-23 21:59:39 +01:00
Fabian Bläse 581eb9d469 buildscript: Remove prepare from buildall command
The builds for all BSPs have been merged into a single OpenWRT buildroot.
A prepare between builds cleans everything that has already been built,
including host tools. Building for multiple targets therefore takes quite
a bit longer than it has to.

This removes the prepare command between builds in the buildall command.
It now behaves exactly like multiple conscutive "selectbsp, build" commands,
which speeds up the build for multiple devices a lot.

This now means, that prepare has to be executed before buildall can be used,
just like with the 'build' command.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-11-23 16:40:02 +01:00
Fabian Bläse d968665704 fff-hoodutils: Add fallback for upgrade path
If no hoodfile is present or hoodfile support is not compiled
into the firmware, no upgrade path is available. This currently
is the case for layer3 variant.

A fallback to our default firmware host is added. At the moment
both variants don't have a trust anchor for TLS and the wget, that
is currently used, doesn't support TLS. Therefore it is currently
necessary to use a unencrypted http URL.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-23 14:29:15 +01:00
Fabian Bläse be04d36784 fff-hoodutils: Adjust upgrade path function for changed folder structure
As we now have multiple variants, the binaries on the update server
should be seperated into different directories.

To allow the firmware to decide which variant it wants to download,
the "$VARIANT/current" part is removed from the hoodfiles. Instead
it is added inside the upgrade path function in fff-hoodutils.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-23 14:29:06 +01:00
Fabian Bläse 3e1f6e167d Remove target and subtarget from filename
This simplifies and shortens filenames quite significantly.

A rewrite script will be installed on the update servers
to allow updating routers with older firmwares.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-20 20:05:03 +01:00
Fabian Bläse 84a937b798 buildscript: add variant information to firmware_release
This also introduces a variant variable in our buildscript, as
it is necessery multiple times in the build process.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-20 20:04:09 +01:00
Fabian Bläse 87f6f9969f fff-web: Do not remove uploaded binary on sysupgrade failure
For some reason sysupgrade seems to return exit status != 0
even on successful calls. As the binary is removed if
sysupgrade exists with a failure status, it is possible that
it got deleted while a sysupgrade has been in progress.

This removal was added to ensure that only one binary occupies
space in tmpfs (which is stored in memory) when upgrading.
If sysupgrade fails and the user starts another try, the old
binary is overwritten by moving the new one to the same location.

Therefore the removal of binaries on sysupgrade failure can be
removed completely.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-11-20 20:01:33 +01:00
Adrian Schmutzler caa248fca1 build_patches: Fix tplink-safeloader for TP-Link CPE210 v3
With the current OpenWrt patches, both CPE210 v2 and v3 can be
flashed with each other's images. Introduce a separate entry
in tplink_safeloader.c to prevent crossflashing.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-20 20:01:08 +01:00
Adrian Schmutzler 1a835f664c fff-wireless: improve treatment of dysfunctional rssileds
The rssileds set up by OpenWrt cannot be used in our firmware.
Despite that those are bound to "wlan0" initially, we also cannot
change them to one of our interfaces, as the interface recreation
due to configurehood seems to break something in rssileds, causing
high load.

This patch now disables the rssileds entirely, which has been found
to be the only solution reliably solving the problem of high load
under all circumstances.

While at it, add all remaining devices with rssileds enabled in
openwrt-18.06. (When updating to openwrt-19.07, most of the ubnt
will have to be added.)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-19 22:27:56 +01:00
Adrian Schmutzler 329ed31cde fff-wireless: merge WiFi adjustments into one simple script
This merges the wifi.* files into a single script, which improves
overview/manageability and makes merging of cases possible.

While at it, remove suppression of errors with "-q".

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-19 22:27:21 +01:00
Adrian Schmutzler 1e963f5f39 Add support for Archer C60 v2
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-19 22:21:42 +01:00
Fabian Bläse 1ea9796074 babeld: Revise version string
As the originally used version string did not include
the daemons name, it is changed to versions like:

babeld-1.9.1+fff2

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-11-17 22:14:43 +01:00
Fabian Bläse 9fc263d093 Bump openwrt, packages and routing to v18.06.5, rebase patches
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-11-17 22:14:43 +01:00
Adrian Schmutzler c4d6e231be babeld: Add pending patch for src_plen assignments
This introduces the pending upstream fix and a patch to change
babeld version.

This applies the naming scheme as for batman-adv:

openwrt-PKG_VERSION-PKG_REVISION

e.g. openwrt-1.9.1-2

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-17 22:14:43 +01:00
Fabian Bläse 441e3a8e3c buildscript: Apply variant to builddir in build step
The build variant previously only got applied in the prepare
step. Therefore selecting a new variant for a subsequent build
without calling prepare again produced a build with a different
variant than the selected one.

As the filename and version number is evaluated in the prebuild
step, which is called on every build, the version number did use
selected variant, so the build variant did not match the variant
in the version string.

As applying the variant only causes the fff-base package to be
fully rebuilt, this step is moved into a function and also executed
in buildscripts prebuild step. It is therefore always applied when
starting a new build.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-11-17 22:14:10 +01:00
Adrian Schmutzler 2b77353685 packages/fff: Merge meta packages for variants into config packages
So far, we have meta packages and config packages for the variants
in parallel, e.g. fff-node and fff-variant-node.

Since the sole purpose of the meta packages is to define
dependencies, one can just merge them into the corresponding config
packages to reduce overhead.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-17 15:48:50 +01:00
Adrian Schmutzler 6f132f858e firewall.d: Check for unset IF_WAN
In some cases (mostly for one-port devices) IF_WAN was used
although not set, resulting in not obviously iptables error
messages like

- Bad argument `conntrack'

- Bad argument `REJECT'

Thus, check whether IF_WAN is set to something before using it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-11-17 15:46:34 +01:00
Adrian Schmutzler 40cad0a9b9 treewide: Force use of busybox wget
In OpenWrt commit 055cdab2bb22 ("uclient: add ALTERNATIVES for wget")
uclient is registered as ALTERNATIVES provider for wget. Since
the priority for busybox as provider is lowest, this overwrites
the link set for /usr/bin/wget, now pointing to uclient wget.

However, uclient wget does not support IPv6 link-local addresses,
as it's not aware of the "%" to separate address from link identifier.

To prevent wget from failing when those addresses are used, this
patch explicitly uses busybox wget.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-17 15:45:24 +01:00
Adrian Schmutzler 3720af5ee5 buildscript: Add separate parameter to update feeds in build dir
By running "./buildscript updatefeeds", the feeds in build dir are
recreated without touching the rest of the directory.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-10 14:27:46 +01:00
Adrian Schmutzler 78e187e7c7 buildscript: Remove obsolete target variable
This removes the target variable, as it is just an alias for
builddir now.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-10 14:27:46 +01:00
Adrian Schmutzler d43ef0a6a0 buildscript: Do not use target-dependent build directory
So far, building the firmware happens in parallel subdirectories
of "build", one for each subtarget. However, OpenWrt itself is
capable of hosting several target builds in its directory, so
there is no need for this extra separation.

This patch thus build all targets/subtargets directly in the
"build" folder.

Since most of the time during build is spent for the toolchain,
this will also significantly boost build time if more than one
target is used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-10 14:27:46 +01:00
Fabian Bläse 6724aaedee Move node-specific firewall rules to fff-node
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-10 14:27:46 +01:00
Fabian Bläse ccfde6c655 fff-network: Remove dependency to uradvd
As odhcpd is used as router advertisement server in layer3 variant,
but configurenetwork is still necessary, the dependency to fff-uradvd has
to be removed.

This is done by first checking, if the fff-uradvd service exists, before it
is restarted.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-11-10 14:22:56 +01:00
Fabian Bläse 3f86bfc70a fff-wireless: Add gateway configuration scripts
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-11-10 14:22:29 +01:00
Fabian Bläse 03d94d92fd nodewatcher: Add support for babel neighbours
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-10-21 13:53:32 +02:00
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
Adrian Schmutzler 8edb1689a3 buildscript: Remove target binaries from build dir before building
So far, if build fails, but images from last successful build are
present in OpenWrt build directory (build/bin/targets/...), those
are copied even after unsuccessful build.

This results in the old images being copied to the bin folder and
being labelled with the new firmware revision. (!)
As our error check also only looks at whether images are there,
the image copying process will look like a success.

This patch deletes old images of the target/subtarget to be built,
so that the copy-firmware step will find nothing if the build
stop to early.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-10-07 14:24:50 +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 d40761c13b Add feed patch to update babeld to 1.9.1
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <fff@chrisi01.de>
2019-09-29 21:22:33 +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
Fabian Bläse a08d42f6aa Bump openwrt, packages and routing to v18.06.4
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-07-22 22:45:45 +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
Robert Langhammer 7a23e58208 build_patches: remove 0004-ar71xx-4.9-l2tp-stats.patch
Removing the tunneldigger, this patch is no longer needed.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-06 14:00:09 +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 9290d11699 gre: Introduce 'nohostroute' option
It is not always necessary to add a host route for the gre peer address.

This introduces a new config option 'nohostroute' (similar to the
option introduced for wireguard in d8e2e19) to allow to disable
the creation of those routes explicitely.

This is a backport from OpenWrt master.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-02 13:08:56 +02:00
Adrian Schmutzler b04b2a7478 build_patches: Remove additional config files preserved during upgrade
OpenWrt saves additional config (and other) files included with
list_changed_conffiles in /sbin/sysupgrade.

This is only active since openwrt-18.06, since before that it was
suppressed by missing opkg.

Since we expect to only save what is in sysupgrade.conf, remove the
additional file list (and thus regain pre-openwrt-18.06
behavior).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-02 13:07:22 +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 95bfe752f0 buildscript: Remove warning due to long factory file names
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-06-16 10:24:42 +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
Adrian Schmutzler f6b4fc26dc bsp: Remove explicit pull of LED trigger packages
These packages are pulled automatically by OpenWrt where needed.

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:17 +02:00
Adrian Schmutzler a60557e3f1 bsp: Remove packages for traffic shaping
We use simple-tc for traffic shaping. If those packages are
actually dependencies of other packages, they should be added
there.

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:31:58 +02:00
Adrian Schmutzler 6c76e14b51 bsp: Remove unused package nls-base
Looks like we do not need this package.

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:31:31 +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 ea6c5d60e9 wireguard: Add option to disable Endpoint Host Dependency
When using IPv6 addresses (or DNS which has AAAA record) as endpoint,
add_host_dependency fails for some reason which causes the wireguard
interface to disappear.

This patch backports an option from OpenWrt master, where
host_dependency can be disabled by adding 'option nohostroute 1'
to the interface.

This is an alternate approach based on the work of Fabian Bläse.

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:20:07 +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 9e6b4c6982 buildscript: Improve loop for applying build_patches
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-04-10 15:26:31 +02:00
Adrian Schmutzler 014f66a8d7 buildscript/patches: Automatically scan directories for feeds
The buildscript knows two different types of patches, which are
applied to pulled-in repositories:

1. Feed patches
Those are applied as "GIT patches" to the relevant repos,
directly after those have been checked out.
They reside in subfolders of the build_patches folder, and
have to be selected individually and manually in the
buildscript.sh.

2. Build patches
Those are applied later in the process, just using the system
patch tool, and changing the $target directory.
All patches in the folder "build_patches/openwrt" are read
and applied automatically.

This is both inconsistent (two different types of patches in
the same dir) and annoying (feed patches have to be specified
by hand), especially for unexperienced developers.

This patch addresses this by:
- separating files into two dirs: build_patches and feed_patches
- automatically scanning feed patches and thus having similar
  experience for the user (I cannot think of a case where we
  provide a patch, but do not use it)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-04-10 15:26:16 +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
Fabian Bläse 7c6978cdde README: Include note about merged Subtargets
When adding support for a previously-generic device, the
correct MIPS MACH has to be added. The compiled image
will lead to bootloops otherwise.

Because this might not be obvious, a note is added to the
READMEs section about supporting a new device.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-02-18 12:12:56 +01:00
Adrian Schmutzler cbc2f7159f bsp: Remove uboot-envtools for 4/32 devices
In OpenWrt 18.06.2, tiny devices have increased in size so that
another packages removal is requires.

Fixes #122.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-02-10 22:45:54 +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 803126e1de buildscript: Indicate current patch being applied
So far, we only saw the files affected, but not the patch used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-02-10 22:44:47 +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 140ea5fe98 buildscript: Fix indentation
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 862f3cdf41 buildscript: Include build variant in firmware version label
With this change, based on a tag "20190101" two firmwares
node-20190101
layer3-20190101
can be created based on build variant.

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 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
Adrian Schmutzler 277e90061c OpenWrt: Bump openwrt, packages and routing to v18.06.2
Refresh patches.

This introduces backported BATMAN fixes up to v2019.0.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thus, the option can be removed.

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

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

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

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

Same is done for queries from gateways.

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

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

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

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

Fixes #110

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

Fixes #113

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

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

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

Fixes #96.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-10-25 16:33:47 +02:00
Tim Niemeyer 6b4b515b2a OpenWrt: Save space
- make USB optional
- remove uboot-env tools for mr3020

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
[fabian@blaese.de: Don't strip libs]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-10-24 18:33:48 +02:00
Adrian Schmutzler 5ccef777fd root_file_system: Remove sysctl.conf
OpenWRT changed their structure to use sysctl.d subfiles.

The default sysctl.conf is empty and kernel.panic=3 is defined
elsewhere. Thus, we do not need sysctl.conf anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-10-24 18:33:48 +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
Tim Niemeyer 65d6a2c505 OpenWrt: Use the tiny target and update names
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
[fabian@blaese.de: Add missing ATH79 MACHs]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-10-24 18:03:55 +02:00
Adrian Schmutzler 6c24b89f16 OpenWRT: Update OpenWrt, packages and routing to openwrt-18.06
Refresh patches.

Bumps batman-adv to 2018.1

This goes beyond 18.06.0 since the release contains bug which
have been fixed in the later snapshots.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
[fabian@blaese.de: Use 18.06.1 for OpenWRT and packages]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-10-24 18:02:11 +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
Fabian Bläse a88484a63d Add batman-adv patch to remove gw mode switch message
This patch suppresses the messages batman writes to
the kernel log when gw_mode is changed. This is done
to avoid spamming the log with negligible messages
when gw_mode is switched frequently.

Fixes: #93

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-25 23:02:11 +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
Adrian Schmutzler 7f53e06036 Unifi AC: remove bs-partition ro-flag
This patch allows to modify the bs-partition on the AC Mesh.

Without the patch, the bs partition on the AC Mesh is locked
forever. This can be a problem if
a) the bs partition has not been updated correctly during initial flash
b) the sysupgrade mechanism is altered by OpenWRT in order to account for
the flip flop layout

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-06-17 10:29:16 +02:00
Adrian Schmutzler 686d0ee2d3 alfred: Support interfaces IDs with more than two digits
Occationally /proc/net/if_inet6 contains interface IDs with
three digits. In this case, the regex in wait_for_ll_address()
does not work anymore and alfred is not starting.

This patch changes the evaluation so that fields are used instead
of the mere position by counting characters.

This is a backport from openwrt-routing and can be removed when
updating to OpenWRT 18.06, but not for newer versions of 17.01.

Fixes #98.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhgammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-06-17 10:27:41 +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
Fabian Bläse 748c8aec2a Revert openwrt patch which caused too high tx powers
Since the reverted patch, device specific antenna gain is not set for some reason.
Reverting the patch in question fixes this issue.

THIS SHOULD BE ONLY CONSIDERD AS A TEMPORARY FIX UNTIL THE ISSUE IS FIXED PROPERLY!

Fixes: #85

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-21 14:48:47 +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 4a23b1baf7 LEDE: Go back to OpenWRT sources
After the remerge the LEDE git source is broken, thus we switch
to the OpenWRT sources.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-01-03 21:30:30 +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
Robert Langhammer 95507d1728 fastd: generate the key from urandom
We do not use encrypted tunnels, so we can use urandom generating the keys to prevent blocking due to low entropy.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2017-12-22 14:06:05 +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 c54596d63f Support subtarget in buildscript
Prepares a subtarget variable for cases where it is not 'generic'

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-11-04 17:29:31 +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 3f9b71d901 buildscript: Fix typo
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-25 14:40:38 +02: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 f7de1eb04c Archer C25: Update qca9887 firmware to 10.2.4-1.0-00029
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-14 18:06:23 +02:00
Adrian Schmutzler a4550ad691 buildscript: Update LEDE and packages, use lede git mirror
- Fixes dnsmasq CVE-2017-13704
- Adds LED support to WA850RE v1

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-14 17:57:49 +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
Tim Niemeyer 6ce8cc5489 buildscript: simplify the use of patches for feeds
Do this by applying the path within the patch function.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-09-18 19:16:50 +02:00
Adrian Schmutzler 6ba8184a2b LEDE: Rebased patches
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-09-17 22:07:12 +02:00
Tim Niemeyer eb05402d48 buildscript: refresh lede/routing/gluon/packages repos
Changes that are relevant for us:
gluon:
    update batman-adv-legacy

lede:
    mbed-tls security fixes
    kernel update
    procd update
    switch Ports on tl-wr741nd
    mac address von tl-wr1043nd-v4

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Christian Dresel <fff@chrisi01.de> (auf einen 1043 v4)
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-09-17 19:34:50 +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
Peter J. Philipp bb426c9e71 Check for root and bail out if the user is root.
Signed-off-by: Peter J. Philipp <freifunk@centroid.eu>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-08-20 14:29:23 +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
Tim Niemeyer 5db3baa11c build_patches: change to git am format
With git am format, it is easier to apply the patches locally.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-07-28 07:51:17 +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
Tim Niemeyer 9fb0b6b045 buildscript: patch source before generating feeds
.. otherwise the applied patches are not used while generating the
openwrt config.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-07-28 07:36:34 +02:00
Tim Niemeyer 4d3f09ca3a buildscript: update lede to 17.01.2
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-07-28 07:33:10 +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 3adfe80d7d build_patches: reintroduce updated l2tp stats patch
Like in the earlier patch, this suppresses the integer overflow
warning for l2tp on 32 bit systems. However, like before, the
underlying counter variable is still a 32-bit integer, so the
traffic counters will just restart at zero after reaching
2^32 bytes = 4 GiB.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Dominik Heidler <dominik@heidler.eu>
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
Adrian Schmutzler 9d00b686a2 feeds/packages: update
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 ca8afbe68b lede: update revision
Signed-off-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
Tim Niemeyer 7fb918403e bsp/ar71xx: use ath10k-ct for archer c7
This enables ad-hoc mode for 5 GHz wireless.

Fixes #2

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2017-04-08 11:58:04 +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 33b0fb5e81 bsp: move archerc7 to ar71xx
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:34 +01:00
Tim Niemeyer b793d5a01c bsp/ar71xx/.config: reconfigure for smaller images
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:30 +01:00
Tim Niemeyer b2427e605d ar71xx: use per device images
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:26 +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 2352b5286d buildscript/bsps: use new images names froms lede
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:16 +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 65f1c3e326 bsp/*/.config: refresh configs
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:09 +01:00
Tim Niemeyer a8b1ccd43c feeds/routing: update to lede branch
Changes the alfred version.

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:05 +01:00
Tim Niemeyer 6f32ef6b7f feeds/gluon: update revision
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:59 +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 52cea6f7a6 feeds/packages: update to lede branch
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:51 +01:00
Tim Niemeyer fce5b0ceef build_patches: update / remove patches
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:45 +01:00
Tim Niemeyer dcdd1ec263 openwrt: switch to lede
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:41 +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 9be699dbf9 bsp/*/.config: remove obsolete config parts
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:30 +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
Tim Niemeyer 303ddf3ce9 openwrt: fix ntp init to accept link local addr
Currently it seems to be more work to fix the ip validation in
ubox project (validate/validate.c). Therefore we just validate it
as string.

Fixes #9

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-01-10 19:30:05 +01:00
Tim Niemeyer e3fe21ec0b openwrt: support region code of cpe2x0/5x0
Fixes #16

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-01-10 19:29:58 +01:00
Tim Niemeyer f8328d3850 openwrt: tp-link region code for wr841-v11
Fixes #16

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Tested-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-01-10 19:29:54 +01:00
Tim Niemeyer 8a459ff854 buildscript: copy the (optional) -eu/-us factory images
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-01-10 19:29:47 +01:00
Tim Niemeyer aa970cd5bb openwrt: backport lede patch for tp-link images
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Tested-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-01-10 19:29:40 +01:00
Jan Kraus 7f82f74d62 Fixed offset warnings at prepare
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-01-06 12:30:59 +01:00
Marco Hald fbfea22528 Updated Openwrt-Routing repository revision
Fixes #1 Alfred Bug

Signed-off-by: Marco Hald <marcohald97@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-01-06 12:30:59 +01:00
Robert Langhammer a5a7c43535 Update OpenWrt revision
This fixes the LEDs on some devices.

Fixes #7

Reviewed-by: Michael Fritscher <michael@fritscher.net>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-01-06 12:28:46 +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 6467efc343 Updated OpenWrt package repository revision.
Including fix for CVE-2016-5195 (dirtycow).

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-11-04 08:03:14 +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
Tobias Klaus d172ff8c4c Backport: enable LNA for CPE210
This patch massivly improves the wireless performance of CPE210

Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-11-04 08:02:37 +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
Jan-Tarek Butt 04b84ee7bf fix patching error by empty build_patches dir
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-10-30 13:18:34 +01:00
Jan-Tarek Butt f9f590d3d6 sed version number to current commit if no tag describe exists
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-10-30 13:17:58 +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
Steffen Pankratz 58c44b574a Updated Gluon repository revision.
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-10-27 00:00:17 +02:00
Steffen Pankratz 41029b7e27 Updated OpenWrt repository revision.
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-10-27 00:00:16 +02:00
Steffen Pankratz f616bb4255 Updated OpenWrt package repository revision.
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-10-27 00:00:16 +02:00
Jan Kraus b78e5b4ac0 Fixed Problems with Port mode changing
cleaned up config files (moved commands to script)

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Jan Kraus <mayosemmel@gmail.com>
2016-10-08 23:19:06 +02:00
Tim Niemeyer c1d30140f1 fff-sysupgrade: add wget as dependency
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-09-10 18:43:01 +02:00
Steffen Pankratz addeb86c6f Moved wget dependency to correct package.
Dependency was not moved, see commit 1243394e6d

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-09-10 12:22:36 +02:00
Robert Langhammer 9c4fe01e65 fff-vpn-select: add missing "/"
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-22 18:54:26 +02:00
Jan Kraus 6786d40096 Fixed Problem with port mode changing
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-20 17:07:22 +02:00
Robert Langhammer 571239c78c fff-vpn-select: add fastd start/stop for various situations
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-20 17:07:22 +02:00
Stefan Waigand cabe901afd WebUI: show MAC and encryption in wifi scan
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Tested-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-20 17:05:36 +02:00
Steffen Pankratz 543d786c46 buildscript: shortened firmware image file names
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-20 17:03:17 +02:00
Jan Kraus d6f2f18e49 Added an automatism which will retrive Router-Coordinates from the old Netmon system
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-20 16:14:18 +02:00
Christian Dresel 0950e58c58 Add support for Ubiquiti Unifi AP
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-08-20 15:48:16 +02:00
Jan Kraus 06e72576d6 Added script parameter to sysupgrade Script
This makes automatic update via cron jobs possible.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-20 14:02:02 +02:00
Robert Langhammer 23203334a4 fff-vpn-select: remove dummy-character
The current broker is no longer cutting off the first character from UUID

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-16 18:45:30 +02:00
Steffen Pankratz bd3eb5eb53 Use official OpenWrt project name spelling.
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-13 18:19:07 +02:00
Steffen Pankratz 35eb0b4183 Removed aux community, not needed anymore.
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-13 18:18:53 +02:00
Jan Kraus 7a89a71be8 fixed typo in package description
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-11 21:50:35 +02:00
Robert Langhammer 751e5ebdd2 fff-tunneldigger: add missing "/"
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-11 21:31:15 +02:00
Jan Kraus 1af366d589 Fixed l2tp kernel patch
It has applied to the wrong directory, so the error was still there.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Tested-by: Robert Langammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-07-22 21:01:31 +02:00
Robert Langhammer 34a5bedad4 change dependencies in fff/Makefile
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Jan Kraus <mayosemmel@gmail.com>
2016-07-22 21:01:31 +02:00
Robert Langhammer 0abb2e3c6a Add package fff-vpn-select
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Jan Kraus <mayosemmel@gmail.com>
2016-07-22 21:01:25 +02:00
Robert Langhammer e17812e4b8 Add fff-tunneldigger
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Jan Kraus <mayosemmel@gmail.com>
2016-07-22 20:50:28 +02:00
Robert Langhammer 1243394e6d fff-fastd: remove fastdstart and add some uci-defaults
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Jan Kraus <mayosemmel@gmail.com>
2016-07-22 20:49:08 +02:00
Jan Kraus 7f61381272 Changed description of upgrade function in WebUI
Flashing of stock firmware is different for different devices.
At least on TP-Link Images it's not working via sysupgrade.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-07-16 09:23:47 +02:00
Tim Niemeyer fd3941dc88 buildscript: add tunneldigger from wlanslovenija
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Rebased to current master
Signd-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-07-03 21:31:51 +02:00
Tobias Klaus 30bf696591 fixes uhttpd-config for initial flash
also fixes noded flashed with "sysupgrade -n"

Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2016-07-03 21:08:55 +02:00
Tim Niemeyer 1313359b1b fff-nodewatcher: bump version
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-06-12 16:19:23 +02:00
Tim Niemeyer e4c776153a fff-nodewatcher: fix shellcheck warnings
- SC2006: Use $(..) instead of deprecated `..`
- SC2086: Double quote to prevent globbing and word splitting.
- SC2046: Quote this to prevent word splitting.
- SC2012: Use find instead of ls to better handle non-alphanumeric filenames.
- SC2004: $ on variables in (( )) is unnecessary.
- SC2016: Expressions don't expand in single quotes, use double quotes for that.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
- fixed typo in same line
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
2016-06-12 16:19:23 +02:00
Tim Niemeyer c33952656c fff-nodewatcher: fastd version only if installed
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-06-12 16:19:23 +02:00
Tim Niemeyer 434dff1929 fff-nodewatcher: add platform as chipset
On some devices cpuinfo returns no "system type". For that devices the
"platform" tag contains the relevant chipset information.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-06-12 16:19:17 +02:00
Tim Niemeyer cd60e63480 fff-nodewatcher: style: fix some long lines
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-06-12 16:18:08 +02:00
Tim Niemeyer f458f196fc fff-nodewatcher: style: unify to spaces
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
- two more tabs to spaces
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
2016-06-12 16:17:56 +02:00
Tim Niemeyer f765eef457 fff-nodewatcher: style: remove unused code
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-12 16:12:42 +02:00
Tim Niemeyer 92dc0c647d fff-nodewatcher: self-detect client interfaces
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-11 14:13:13 +02:00
Tim Niemeyer d9d69f55aa fff-network: move default-bsp files to package
- mv /etc/network.* files to package
- mv /etc/config/network to package
- also removes the bsp specific root_file_system

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-11 14:11:37 +02:00
Tim Niemeyer 156e493afb fff-timeserver: new package to configure a timeserver
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-11 14:11:10 +02:00
Tim Niemeyer 484c7d7bdd bsp/default: remove obsolete qos
qos is now done by fff-web via simple-tc.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-06-11 14:10:41 +02:00
Tim Niemeyer cac1ef47e4 fff-boardname: mv rc.local board detect to package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-11 09:42:09 +02:00
Tim Niemeyer d8c20b7897 bsp: merge wdr4300 to ar71xx
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-11 09:41:46 +02:00
Tim Niemeyer 2bd50f3b87 fff-wireless: new package to configure wifi
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2016-06-11 09:41:14 +02:00
Tim Niemeyer d901f7c442 fff-sysupgrade: move sysupgrade.sh to package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-10 23:13:46 +02:00
Tim Niemeyer da9ff2ccff bsp/default/config/network: fix mtu
- mtu of 1528 is enough for no fragmentation
- also some cleanups
- interface 'bat' was never needed

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-10 23:02:55 +02:00
Tim Niemeyer c5f7fda17e buildscript: do not create .orig files during patch
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-10 23:01:40 +02:00
Tobias Klaus d253a1be75 makes batman-adv config a uci-defaults script
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-06-10 22:58:40 +02:00
Tobias Klaus 006d92b4ef makes nodewatcher config a uci-defaults script
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-10 22:58:33 +02:00
Tobias Klaus d16f7cdc0a makes fff-web config a uci-defaults script
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-10 22:58:17 +02:00
Tobias Klaus e73b1d0401 fff-support: fixes build for non ar71xx machines
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Tested-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-10 07:47:43 +02:00
Jan Kraus 4e145b83b9 Moved network configuration script to own package
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Changed mode of configurenetwork to 755
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2016-05-16 14:33:22 +02:00
Christian Dresel 07fa061065 Not Cache the WebUI
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-05-16 14:11:39 +02:00
Tim Niemeyer 6f4c9cddba buildscript: buildrelease: fix parameter handling
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-05-15 17:01:40 +02:00
Tim Niemeyer 1b7babb299 buildscript: buildall: call functions
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-05-15 17:01:40 +02:00
Tim Niemeyer be951267b9 buildscript: set or load bsp/community in function
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-05-15 17:01:40 +02:00
Tim Niemeyer d8b224c4f1 buildscript: buildall: remove community parameter
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-05-15 17:00:57 +02:00
Tobias Klaus bb3fc82089 adds optional script to enable poe passthrough on cpe210
The script is only included in ar71xx builds and only executes on the
cpe210 v1.1 hardware.
It is intended to be called from /etc/rc.local.fff_userconfig since the
state of poe passthrough is reset on each reboot.

Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-05-15 16:55:20 +02:00
Tobias Klaus 49975b9bd9 more explanation for network.mode file
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-05-15 16:55:20 +02:00
Tobias Klaus cd50199cbb adds support for tp-link cpe210
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-05-15 16:54:54 +02:00
Jan Kraus ba3c645a52 renamed package feed "batman_adv" to the correct name "gluon"
This will prevent double work because of missunderstandings.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-05-15 16:50:48 +02:00
Tobias Klaus 24c70bdd57 adds a 'support' package for scripts not neccessary
First functionality is the possibility to have a file
/etc/init.d/fff-userconfig on the nodes that is execeuted
on each reboot and survives sysupgrades

Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
- Whitespaces fixed
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2016-05-06 13:31:19 +02:00
Tobias Klaus ebd863c23e Makes firewall init script executable
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-05-04 10:04:49 +02:00
Tim Niemeyer c22ab49b91 buildscript: bump openwrt to eadf19c0b43d2f75f196ea8d875a08c7c348530c
Mainly bcm53xx fixes have been introduced

But also two main changes for us:
* The fix for Nanostation/Picostation is now mainline
  -> remove ar71xx-make-bootconsole-wait-for-both-THRE-and-TEMT.patch
* WR841v11 is now in upstream
  -> remove ar71xx-Add-TL-WR841N-ND-v11-support.patch

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
CC: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-04-30 11:10:55 +02:00
Tim Niemeyer 82075fbf90 gitignore: fix for not ignoring build_patches folder
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-04-26 19:30:20 +02:00
Tobias Klaus d6fa29f86a Adds support for WR841n-v11
* adds openwrt patch
* adds networkconfig

power-LED is not working

Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-04-24 10:35:32 +02:00
Jan Kraus 8baa79ad01 Removed unused board_* functions
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-04-09 22:56:43 +02:00
Christian Dresel 51d512e23d Add support for Ubiquiti Bullet M
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
    [rebased to master]
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2016-04-06 18:37:21 +02:00
Jan Kraus 2499110673 Added Support for TP-Link MR3020
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-04-06 18:33:17 +02:00
Tim Niemeyer af80123aa2 fff-nodewatcher: remove busybox httpd
- remove httpd from .config
- remove httpd startup from rc.local
- add crawldata path creation in nodewatcher

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:34 +02:00
Tim Niemeyer ec380f7918 bsp/*/.config: refresh configs
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:32 +02:00
Tim Niemeyer 10d138cd2e fff-nodewatcher: add dependency to ip and ip-bridge
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:30 +02:00
Tim Niemeyer 6ee643b66b fff-random: move random from fff to own package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:27 +02:00
Tim Niemeyer 329a45c22b fff: depend on new fff- packages
- fff-batman-adv-legacy
- fff-fastd
- fff-firewall

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:17 +02:00
Tim Niemeyer b61830c304 fff-firewall: new package
- moves the node<-->client ra rules to package fff-uradvd

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:11 +02:00
Tim Niemeyer 7f42d5c4ec fff-fastd: new package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:06 +02:00
Tim Niemeyer 26779bee85 buildscript: copy the community.cfg to the root fs
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:27:03 +02:00
Tim Niemeyer 2f19bef9d0 fff-batman-adv-legacy: new package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-04-05 23:26:55 +02:00
Jan Kraus da1199a55b added buildrelease() for release process
also changed image comparing at sysupgrade to sha256 and added the related tool

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>

Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-04-05 23:26:49 +02:00
Jan Kraus 1050923f24 Added Version check in sysupgrade
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>

Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-04-05 23:26:39 +02:00
Jan Kraus ff7e8b7a66 use custom names for binary builds. fixes #9
also removed function board_clean from bsp files and board_postbuild from buildscript

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>

suggested-by: Alexander Wunschik <freifunk@wunschik.net>
Co-Authored-by: Alexander Wunschik <freifunk@wunschik.net>
Co-Authored-by: Tobias Klaus <tk+ff@meskal.net>

Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-04-05 23:25:59 +02:00
Christian Dresel c795ffad5f ar71xx-make-bootconsole-wait-for-both-THRE-and-TEMT
Fix the Race Condition on boot

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Ralph A. Schmid, dk5ras <ralph@schmid.xxx>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-03-27 10:43:33 +02:00
Dominik Heidler 3e78b9e1fa Fix l2tp stat counter
The 32 bit counter was incorrectly interpreted as signed
when being converted to the 64 bit value used for the
sysfs output.

Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
[rebased to master, rename patch and remove buildscript part]
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2016-03-24 23:20:38 +01:00
Jan Kraus 753b755783 Changed patch behavior because if was not comfortable. Now you don't need to add every patch into buildscript.
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-03-24 23:16:08 +01:00
Jan Kraus aa53fb70f1 Added numbers to build_patches to see the history of the Patches and created folders for each feed.
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-03-24 23:15:57 +01:00
Dominik Heidler bb2147de7e WebUI: New public status page
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-03-14 21:31:55 +01:00
Dominik Heidler 6c564588ec Add new WebUI
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-03-14 21:26:49 +01:00
Dominik Heidler cd848616ff Remove the old WebUI
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-03-14 21:26:32 +01:00
Tim Niemeyer 056035ffab buildscript: bump up OpenWRT
New version is c75367d20240da182fcbdb68c8cce64eabd71ac5
- Security fixes (glibc)
- Kernel update 3.18.27
- ar71xx: ethernet fixes
- mac80211: new version
- support WR741v5
- odhcp6c: minor fixes
- support WR741v5, WR1043v3, WR941v6

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-03-10 18:44:15 +01:00
Dominik Heidler e0202dedec Fix showing VPN status in the WebUI
Just check if fastd is running

Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-03-08 21:48:27 +01:00
Tim Niemeyer 32de2cc58e .gitignore: add .mailmap
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-03-08 21:32:49 +01:00
Tim Niemeyer 0d4fc3b25e .gitignore: fix entries
Some entries were matching on subfolders.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-03-08 21:32:21 +01:00
Tim Niemeyer b944cc8629 bsp/default: remove unused files
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-03-08 21:31:26 +01:00
Tobias Klaus edd371b09a Fixes mixup of bitrate and bandwidth
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-03-08 21:18:06 +01:00
Tim Niemeyer 766baa710c buildscript: bump openwrt to a03a846c49c067048cd225d476a7adf91ef8ff03
- kernel security fixes
- ar71xx dma bug fixes
- ..

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2016-02-28 15:31:51 +01:00
Dominik Heidler 190e27605d Update some settings labels
- Make GEO strings smaller to prevent breaking layout
- Specify E-Mail insted of Kontakt (Monitoring will need the E-Mail)

Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-02-27 13:29:24 +01:00
Christian Dresel 9635d461a5 Link the E-Mail with mailto on the Publicpage
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-02-27 13:26:07 +01:00
Christian Dresel 94399d3b49 Allow 128 character in e-mail address
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>

	modified:   src/packages/fff/fff-web/files/www/ssl/settings.js
2016-02-27 13:25:22 +01:00
Dominik Heidler 2809a82bb9 Fix map submit: trigger form change event
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-02-13 11:53:58 +01:00
Dominik Heidler ae77dcd73d Remove unused (and confusing) file
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-02-13 11:52:56 +01:00
Christian Dresel 68314ea943 Add support for Powerbeam M2 XW
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-31 19:02:04 +01:00
Dominik Heidler 8857560cb4 Fix Map
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-31 18:55:52 +01:00
Tim Niemeyer 2850d9af1b packages/fff-uradvd: new package to conf/start uradvd
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-31 18:44:03 +01:00
Alexander Wunschik f6bd067db4 changed buildscript usage-messages to docopt standard.
Signed-off-by: Alexander Wunschik <freifunk@wunschik.net>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-01-31 18:09:47 +01:00
Alexander Wunschik 6e4ca690f0 git-ignore *.patch files in the root directory.
Signed-off-by: Alexander Wunschik <freifunk@wunschik.net>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-31 18:08:54 +01:00
Jan Kraus 9060674190 Add support for GL-AR150
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-31 18:02:41 +01:00
Tim Niemeyer d8eccf57e3 fff: advertise fdff:0::/64 to access web interface
This patch adds a prefix advertisment for each node. Every node get also
the IPs
* $prefix::MAC
* $prefix::link-local
* $prefix::1

::1 is duplicated so we need filtering to not forward data into the
network for ::1.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-31 18:02:06 +01:00
Dominik Heidler afc9fe3c93 Prettify public statuspage
- Add Link to Monitoring Page (Description is the Link)
- Add <a> tag to Position to preserve style
- Set "FFF Router :: $hostname" as Title

Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-26 17:34:57 +01:00
Dominik Heidler 5479fb2955 Add Leaflet-Map Position selector
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-26 13:05:02 +01:00
Tim Niemeyer 2d8fa07948 fastdstart: send geo location
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-26 00:46:05 +01:00
Tim Niemeyer 5940b43765 web/nodewatcher: add description/position_comment
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-26 00:46:00 +01:00
Tim Niemeyer 34b11267e5 fff-nodewatcher: remove configurator
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-26 00:45:55 +01:00
Tim Niemeyer 6920c9f694 fff-nodewatcher: collect geo and contact
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-26 00:45:47 +01:00
Tim Niemeyer ba619c8bc8 fff-web: store geo location in two variables
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-26 00:45:38 +01:00
Tim Niemeyer 04a89f1e9d buildscript: update batman-adv (fix gw selection)
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2016-01-26 00:04:54 +01:00
Tobias Klaus c46dff2e81 makes ETH0MAC the same semantics as other *MAC config variables
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-25 23:58:48 +01:00
Steffen Pankratz 6129130103 Added support for TP-Link TL-WR1043N/ND v3
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
2016-01-24 22:50:18 +01:00
Christian Dresel eb8e23e932 Hardware TP-Link WA850RE added
Der TP-Link WA850RE ist von der Hardware baugleich mit dem WA860RE somit
wurde die Konfiguration zu größten Teilen kopiert. Der einzige
Unterschied ist der, das der Router keinen Durchgang für den Strom hat
und somit eine Steckdose blockiert.

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-21 07:52:14 +01:00
mayosemmel 5ca5ce632e add /etc/config/system to sysupgrade.conf to preserve hostname
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-13 20:59:49 +01:00
Alexander Wunschik 0acbf039e2 Update README.md
added `realpath libssl-dev`to Prerequisites
2016-01-07 11:51:07 +01:00
Steffen Pankratz 4caed089f8 Fixed sysupgrade.sh for TP-Link TL-WDR4310 v1
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-04 17:42:38 +01:00
Steffen Pankratz 2fc4041eb4 Fixed sysupgrade.sh for TP-Link TL-WDR3600 v1
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-04 17:42:38 +01:00
Steffen Pankratz 3203bc7485 Fixed sysupgrade.sh for TP-Link TL-WDR4300 v1
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-04 17:42:38 +01:00
Steffen Pankratz 338c21a5af Fixed sysupgrade.sh for TP-Link TL-WDR3500 v1
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-04 17:42:38 +01:00
Steffen Pankratz 0a65260ec9 Fixed sysupgrade.sh for TP-Link TL-WDR4900 v1
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-04 17:42:38 +01:00
Steffen Pankratz e99d5841c8 sysupgrade.sh: use community specific 'UPGRADE_PATH' value
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-04 17:42:38 +01:00
Steffen Pankratz 78af9cdb76 Fixed substitution of UPGRADE_PATH in firmware.tpl
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-04 17:42:38 +01:00
Steffen Pankratz fe99a66dce - deleted /etc/config/dropbear (only contains default values)
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2016-01-03 14:48:39 +01:00
Christian Dresel ec7fe85ab6 Added support for TL-WA860RE
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-01-01 18:31:03 +01:00
Tim Niemeyer 40d33f9e7c bsp/*/.config: update
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-30 16:14:01 +01:00
Tim Niemeyer bd9420b5fb fff-web: add web interface package
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-30 16:09:45 +01:00
Tim Niemeyer 866d2ce320 package: add haserl and simple-tc
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-30 14:52:32 +01:00
Tim Niemeyer aad3ba8403 nodewatcher: move to separate package
- remove template parameter NETMON_IP (it's always the same)
- add new fff-nodewatcher package
- move nodewatcher, configurator, syncHostname to fff-nodewatcher
- fff-base selects fff-nodewatcher

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-30 08:01:32 +01:00
Tim Niemeyer 95584de639 bsp/default: add micrond
With micrond it is possible that every package has its own crontab.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-30 08:01:32 +01:00
Steffen Pankratz a275253155 - fix shadow password support
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reveiwed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-12-14 19:45:11 +01:00
Steffen Pankratz 01690a3153 - deleted file /etc/config/dhcp, not needed
As we don't even have a DHCP server in the image.

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reveiwed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-12-14 19:45:11 +01:00
Tim Niemeyer 14388ef552 .gitignore: ignore only downloaded packages
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-13 22:18:41 +01:00
Steffen Pankratz 4e9d081658 bsp/*/config/wireless: remove hidden parameter
- 'hidden = 1' does not make sense for ad-hoc networks, they need the
  SSID to be visible for cell merging to function properly

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reveiwed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-12-13 11:07:23 +01:00
Dominik Heidler ff6e92b7b1 add mechanism for announcing usergen status txt
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-12-13 11:05:18 +01:00
Steffen Pankratz 59ef3c0534 - fixed BOARD value for PicoStation and NanoStation
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-12-10 21:46:42 +01:00
Steffen Pankratz 87ec54d072 - fixed crontab entry (plus white space fix)
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-12-10 21:46:23 +01:00
Tim Niemeyer 2044316349 bsp/*/.config: regenerate using buildscript
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 14:17:32 +01:00
Tim Niemeyer 5fc79ebbf2 bsp: merge all 2.4GHz only ar71xx to one bsp
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 14:17:32 +01:00
Tim Niemeyer 19da0b7d57 buildscript: remove kernel config
This part was broken, as the stored .config doesn't contain the
arch/version anymore.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 13:52:27 +01:00
Tim Niemeyer 854b686935 buildscript: use diffconfig.sh to store .config
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 13:52:27 +01:00
Tim Niemeyer ece5c0fb2e bsp/*/.config: use defconfig and manually rewrite
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 13:52:27 +01:00
Tim Niemeyer 524a03d214 buildscript: add fff packages
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 13:52:27 +01:00
Tim Niemeyer 39c035cc8e packages/fff: add fff-base package
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 13:52:27 +01:00
Tim Niemeyer b5e5caa741 buildscript: allow feed without url
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 13:52:27 +01:00
Tim Niemeyer ae16b107a3 buildscript: clean up downloaded packages on clean
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-10 13:52:27 +01:00
Tim Niemeyer 3031d176c4 buildscript: bump openwrt: 841v10 is now mainline
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-06 17:13:40 +01:00
Tim Niemeyer bcf51e6116 buildscript: add GPLv3 license
CC: Clemens John <clemens-john@gmx.de>
CC: Bjoern Franke <bjo@nord-west.org>
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Signed-off-by: Bjoern Franke <bjo@nord-west.org>
2015-12-05 10:24:34 +01:00
Steffen Pankratz a36dea8818 OpenWRT revision upgrade
- fixes build issue, caused by broken OpenSSL download link

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-12-04 21:51:03 +01:00
Tim Niemeyer c6f6932e9d config/batman-adv: disable network coding
- added new (empty) config options
- disable network coding
- unified formatting

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-12-03 16:36:25 +01:00
Tim Niemeyer d97a8eac87 random.sh: random timing for netmon communication
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-29 15:34:40 +01:00
Tim Niemeyer b37f9a36a8 configurator,crontab: smaller clean ups
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-29 15:32:42 +01:00
Tim Niemeyer 101cd5900d configurator: separate sync hostname
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-29 15:28:41 +01:00
Tim Niemeyer e571c0f84f firmware_release: expose community via nodewatcher
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-22 11:54:52 +01:00
Tim Niemeyer 459fd45daa wr841: find v10 and set BOARD config
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-21 11:48:54 +01:00
Steffen Pankratz 31858387de - updated 'bsp/*/.config' files
* enabled ip-bridge utility
* enabled kmod-batman-adv-legacy

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-11-21 06:37:02 +01:00
Steffen Pankratz f0528215ca - removed not needed packages
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-11-21 06:36:42 +01:00
Tim Niemeyer 6ddc5bed4f bsp/wr841: add support for v10
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-17 18:40:17 +01:00
Tim Niemeyer 700831d3b5 bsp/default: nodewatcher: use bridge from iproute2
brctl isn't part of OpenWRT anymore. Rewrite the client-count to bridge util
from iproute2 package.

Another alternative may be to use "batctl tl" but there we get false positives
for local interfaces.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-17 18:38:51 +01:00
Tim Niemeyer c85e42988f bsp/default: remove wlanwatchdog and dependencies
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-17 18:37:12 +01:00
Tim Niemeyer d443b28ec8 bsp/default: remove showmacs.sh
This script is obsolete by the iproute2 bridge tool.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-17 18:35:19 +01:00
Tim Niemeyer 11aff9654d buildscript: change batman feed to gluon batman-legacy feed
I discovered some batman-adv problems with the gateway selection.
Sometimes just the wrong gateway was selected. The gluon project added
some batman-adv patches which deal with gateway selection problems.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-17 18:24:30 +01:00
Tim Niemeyer 79988fc236 buildscript: update routing feed
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-17 18:12:41 +01:00
Tim Niemeyer 1d57dc3ea8 buildscript: remove fastd feed
- Fastd is part of the official OpenWrt package feed.
- The removed feed wasn't a correct feed.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-17 18:11:05 +01:00
Tim Niemeyer 39d444b051 buildscript: Update OpenWRT to 15.05
- Updates openwrt package feed
- Removes openwrt old_package feed

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-11-17 18:04:54 +01:00
Steffen Pankratz c10ae3024b - removed 'version' property, to eliminate confusion with value in /etc/nodewatcher.sh
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-11-17 15:28:39 +01:00
Steffen Pankratz eb60c91900 - use value from /var/sysinfo/model instead of /var/sysinfo/board_name for model property
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-11-17 15:28:39 +01:00
Steffen Pankratz 6977c92f88 - unified formatting (no functional changes, only white space changes)
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
2015-11-16 15:07:45 +01:00
Steffen Pankratz b7a65abd67 - fix to enable wifi channels 12 and 13 in Germany
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
2015-11-16 15:07:45 +01:00
Steffen Pankratz e57ec0c2bf - removed superfluous single quotes
Only options or values which may contain spaces need them

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
2015-11-16 15:07:45 +01:00
Steffen Pankratz ead1248542 - removed unused option
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
2015-11-16 15:07:45 +01:00
Steffen Pankratz 7351df8c8b - added country code information
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
2015-11-16 15:07:45 +01:00
Steffen Pankratz 124aa66067 - enabled/modfied 802.11n (single 20MHz channel) for 2.4 GHz
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
2015-11-16 15:07:45 +01:00
Steffen Pankratz ac66f886a2 - fixed hardware mode, there is neither 11ng nor 11na
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Michael Fritscher <michael@fritscher.net>
2015-11-16 15:07:45 +01:00
Steffen Pankratz bba3b9a168 - added support for TP-Link TL-WR842ND v2
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-10-20 20:57:58 +02:00
Steffen Pankratz 05773565ad Fixed 'your configuration is out of sync' warning.
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-10-15 19:42:21 +02:00
Steffen Pankratz 222111a219 Added second OpenWrt routing packages feed. * one feed for batman-adv (revision of latest supported COMPAT_VERSION 14 version) * one feed for all other packages than batman-adv (current revision)
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-10-13 22:21:59 +02:00
Tim Niemeyer 12eeaf3128 bsp/*/.config: enable CONFIG_PACKAGE_alfred
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-10-13 19:40:24 +02:00
Tim Niemeyer e137e40303 alfred: configure and enable node.data on alfred
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-10-13 19:40:24 +02:00
Tim Niemeyer df9f672a35 alfred: fix boot up
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-10-13 19:40:24 +02:00
Tim Niemeyer 9addbe2e0a buildscript: add alfred
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-10-13 19:40:24 +02:00
Tim Niemeyer 6c98267ff8 buildscript: support multiple patches on feeds
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-10-13 19:40:18 +02:00
Tim Niemeyer d9dbaf7d97 nodewatcher: only add direct batman originators
This is a normal scenario:
-- %< --
originator last-seen (quality) nexthop [interface]: .. possible nexthops ..
A    0.270s   (134) A [    w2mesh]: C ( 79) A (134)
B    0.170s   (245) B [    w2mesh]: B (245)
C    1.850s   (152) C [    w2mesh]: A ( 83) C (152)
-- >% --
Nodewatcher will send only the originator, last-seen, quality, nexthop
and the interface. Nothing about the possible nexthops. Because Netmon
can't show every Originator (to bad performance), we need some filtering,
to only see direct neighbors. At the moment Netmon stores only
originator == nexthop entries. And there is no other way to filter,
because Netmon has only this information.

But this may fail. The problem occurs, if A has a better connection
(e.g. via eth0) with leads to an quality of 255:
-- %< --
A    0.270s   (255) A [    eth0]: C ( 79) A (255)
B    0.170s   (245) B [    w2mesh]: B (245)
C    1.850s   (204) A [    eth0]: A (204) C (152)
-- >% --
In this example, Netmon wouldn't show the connection to C.

This patch doesn't use the originator == nexthop filter. Instead a
filter like "originator is anywhere in the possible nexthops" is used.
With this, we can disable the filtering in Netmon and show at least that
there is directly connection. With the "batctl o" command it is not
possible to show the correct interface for this direct connection.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-10-11 12:00:03 +02:00
Tim Niemeyer 368241ec28 nodewatcher: remove unused ip addresses from xml data
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-10-11 11:50:39 +02:00
Tim Niemeyer d6ac1df7ec nodewatcher: add the router model
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-10-11 11:48:32 +02:00
Tim Niemeyer 913ccd1733 nodewatcher: add a iface blacklist
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-10-11 11:47:33 +02:00
Dominik Heidler 7eb76deda3 compress node.data using gzip (to save traffic)
netmon supports gzip compressed node.data as of
d96458744b

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
- Backported from ffff-next
CC: Dominik Heidler <dominik@heidler.eu>
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-10-11 11:45:37 +02:00
Tim Niemeyer 9cf163ace1 community: add refugee community
This is a community file to automatically connect bigger
refugee camps to the Freifunk Franken network.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-10-11 11:44:36 +02:00
Tobias Klaus b18f541c34 adds dropbear config to sysupgrade.conf
-> no new host-key to accept after upgrade
-> no copying of authorized_keys after upgrade

Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-10-10 10:30:34 +02:00
tk+ff@meskal.net 53257078c9 splits configuration and implementation for different ubnt setups
* introduces new file network.mode currently only used for nanostation
* network.mode is added to sysupgrade.conf
=> once configured the the setting should survive an upgrade

Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-09-27 11:27:27 +02:00
Tim Niemeyer 4739251fff cron: disable every 1min the gw selection for 1s
This helps batman-adv to find a new and better gateway.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-09-21 15:22:23 +02:00
Tim Niemeyer a7c73a1e4a batman-adv: enabled client gateway mode
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-09-21 15:22:23 +02:00
Tim Niemeyer 0737c5df82 firewall: filter broadcasts
This ebtables rules are based on the gluon work.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-09-21 15:22:14 +02:00
Tobias Klaus ddd8e228b1 start ntpd after 30s to ensure that the interface is up
Suggested-by: Sebastian Laubscher <sebastian@laubscher.name>
Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-09-08 20:59:52 +02:00
Steffen Pankratz f0bf6f2f5c - updated OpenWrt packages feed revision
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-08-30 11:58:21 +02:00
Steffen Pankratz e95b2474bd - updated OpenWrt feed revision
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-08-30 11:58:05 +02:00
Tim Niemeyer 39a275a1a1 fastdstart: moved to keyserver.freifunk-franken.de
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2015-08-30 11:57:55 +02:00
Steffen Pankratz b9b5166540 - updated fastd to version 17 and changed git URL to the official one
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Tobias Klaus <tk+ff@meskal.net>
2015-08-07 12:31:45 +02:00
Steffen Pankratz 11206316be - removed board_flash function, like done for all the other bsps (see 329b24af32) - removed empty line
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-08-07 12:00:01 +02:00
Steffen Pankratz 64ded4a9c3 - updated OpenWrt .config files to match the currently used OpenWrt revision
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-22 21:39:17 +02:00
Steffen Pankratz baae02cbf7 - simplified .gitignore
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-22 21:37:56 +02:00
Steffen Pankratz bcb17059da - fixed tabs vs. spaces mix-up by using only spaces
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-21 08:04:40 +02:00
Steffen Pankratz 1cba3f0e59 - added double quotes to prevent globbing and/or word splitting
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-21 08:04:40 +02:00
Steffen Pankratz daec0b949a - omit the output, we are just interested in the result
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-21 08:04:40 +02:00
Steffen Pankratz 5df2c56e25 - corrected PACKAGESVAR array handling
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2015-07-21 08:04:13 +02:00
Steffen Pankratz e3e9327c4e - added warning about batman-adv COMPAT_VERSION
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 07118eec75 - optimization: one redirect is enough
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
- Removed one ">" to overwrite firmware_release.
2015-07-20 18:26:31 +02:00
Steffen Pankratz 0bce38b3a2 - better to use bash's build-in glob functionality instead of looping over the returned find output
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 762ab6013b - corrected FEEDVAR array handling
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz b343efab83 - fixed '$' on regular variables in arithmetic contexts has no purpose
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 52032b47cf - fixed wrong quoting
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz d21e99a5f5 - removed FIRMWARE_REVISION as it has the same information as RELEASE_DATE and renamed RELEASE_DATE do better match its actual purpose
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 2a7b0bfd95 - quoted log messages properly
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 54131cb1c8 - use proper POSIX-conforming arithmetic expansion
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz d84b0a5ade - optimized grep call
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 62a1504a57 - fixed git cloning after $DIRECTORY had to be deleted
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz dda4316660 - fixed log message in 'checkout_git' function
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 3d067eeb2e - removed unnecessary check
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 277abb5ee8 - optimized sysupgrade_no_config_save.patch patch call
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz 18f6f8e3d4 - removed subversion handling, not needed anymore
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-20 18:26:31 +02:00
Steffen Pankratz c1c8434c32 - fixed tl-wr841n-v7 board name issue
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-09 21:31:59 +02:00
Steffen Pankratz 391a8d05af - added OpenWrt oldpackages feed, to resolve missing packages like 'bridge', 'gpioctl-sysfs', 'libugpio', 'mii-tool' and 'kmod-gpiotoggling'
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-09 19:36:50 +02:00
Steffen Pankratz dcc37bc6af - use the OpenWrt packages git repository instead of the svn repository
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-09 19:36:44 +02:00
Steffen Pankratz 559b6e7cf8 - use the OpenWrt git repository instead of the svn repository
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-09 19:33:55 +02:00
Steffen Pankratz 5226e13bf7 - fixed usage of 'PACKAGEREV' and 'PACKAGEURL' variables
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-09 19:33:53 +02:00
Steffen Pankratz 2707ab9d2a - removed unused packages and feeds
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-09 19:33:51 +02:00
Steffen Pankratz 8fa25fcde8 - removed unused tunneldigger package from NanoStation-Loco-M2 bsp
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-07-05 18:50:31 +02:00
Steffen Pankratz 08bc77e76d - removed libremap-agent package/feed including dependencies
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-06-25 20:55:36 +02:00
RedDog99 59f26eee3b Merge pull request #24 from meskal/fixSysupgradePatch
fix warning when applying patch  sysupgrade_no_config_save
2015-05-25 16:56:33 +02:00
Tobias Klaus b6e8ec9c29 fix warning when applying patch sysupgrade_no_config_save 2015-05-23 14:45:28 +02:00
Tim Niemeyer 1419a08d5d bsp/ubnt-nano-m: Support for NanoStation-Loco-M2
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-01-18 22:06:55 +01:00
RedDog99 3fe725e1a4 Merge pull request #23 from meskal/indentation
fix some indentation issues
2014-11-30 20:48:59 +01:00
Tobias Klaus 6815f3ca52 fix some indentation issues
* spaces -> tabs
2014-11-30 15:32:41 +01:00
RedDog99 bf565a0607 Merge pull request #22 from meskal/reworkFeeds
Rework feeds
2014-11-30 11:58:33 +01:00
Tobias Klaus 46232cea1a Generalize handling of feeds and packages
* Simplifies adding new feeds and packages
* Better separation of implementation and configuration
* get rid of having to modifiy another file when adding
  feeds(build_patches/feed.conf)
2014-11-30 11:14:14 +01:00
Tobias Klaus a355145758 use dedicated functions to checkout svn/git repos
increases readability of get_source()
2014-11-29 20:40:18 +01:00
Tobias Klaus 5146e9fbee remove unused tunneldigger package and feed 2014-11-29 20:40:18 +01:00
RedDog99 b52bdf76b8 Merge pull request #18 from magenbrot/master
verschiedene Änderungen
2014-11-29 18:12:22 +01:00
RedDog99 69b4062c94 Merge pull request #21 from meskal/typo
small typo in README.mk
2014-11-29 14:40:11 +01:00
Tobias Klaus dcd62e01b5 small typo in README.mk 2014-11-29 00:44:18 +01:00
Oliver Voelker 9b077d4cc7 Hilfetext erweitert 2014-11-13 00:05:07 +01:00
Oliver Voelker fd1195d15e buildscript can also "clean" up 2014-11-12 22:49:28 +01:00
Oliver Voelker 5d907840f7 leerzeilen entfernt, fehlende shebangs hinzugefügt 2014-11-12 21:22:55 +01:00
Oliver Voelker 329b24af32 board_flash removed
unused
2014-11-12 00:25:41 +01:00
Oliver Voelker 29e733a2c8 cosmetic changes 2014-11-11 23:53:35 +01:00
Oliver Voelker 1b075acd6e add own shell profile
this is for a nicer prompt and conveniant aliases
2014-11-11 23:52:36 +01:00
Oliver Voelker ef097b8e3c was ist ein BSP
Board-Support-Package
2014-11-11 21:30:06 +01:00
Oliver Voelker 578810df2f removed unused/broken functions 2014-11-11 21:29:41 +01:00
Oliver Voelker 0e1812ef5b added .project to .gitignore 2014-11-11 21:29:00 +01:00
Oliver Voelker f3d66e2cc4 anderes pingziel eingestellt und kommentiert 2014-11-10 21:00:16 +01:00
Oliver Voelker 4322fde6c2 delete some empty lines... ;) 2014-11-10 21:00:16 +01:00
Oliver Voelker 57db955ee5 configure all hosts for our ping test in the header ;) 2014-11-10 21:00:16 +01:00
Oliver Voelker 7778ce70ed diverse Aenderungen an Shell-Scripten
- Klammern um if-Statements
  - == als Vergleichsoperator gibts nur in der Bash, wir haben aber nur sh (ash) verfuegbar

es ist nicht auszuschliessen, dass die Aenderungen nun andere Fehler zur Folge haben, wo vorher keine waren, da das Script doch irgendwie die "richtigen" Werte hatte.
Die bourne shell (sh) ist nicht so umfangreich wie die bourne again shell (bash).
2014-11-10 21:00:16 +01:00
Tim Niemeyer e2e67b31fc .gitignore: do not ignore checked in packages
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2014-11-10 20:44:30 +01:00
Tim Niemeyer 2aef90aadd bsp/defaul/network|showmacs: add license
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2014-11-10 20:31:28 +01:00
Tim Niemeyer 39f7565b92 packages/ffol: remove unused old ath9k-watchdog
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2014-11-10 20:30:32 +01:00
Tim Niemeyer f87f882794 Revert "Added GPL2 to repo as OpenWRT is GPL2 too."
This reverts commit 2fa25d5c3b.

OpenWRT is not part of this repository. Furthermore in this repository
are more than just one software components.
2014-11-10 20:13:36 +01:00
Mose 2fa25d5c3b Added GPL2 to repo as OpenWRT is GPL2 too.
This closes #1
2014-11-10 15:04:45 +01:00
mojoaxel 3845a7262e added support for tl-wr1043nd-v2 2014-11-09 21:58:06 +01:00
Oliver Voelker ec213c62d3 Merge pull request #8 from magenbrot/master
Update readme, fehlende Tools
2014-10-29 00:57:16 +01:00
Oliver Voelker 7b657981b4 git und subversion brauchts auch 2014-10-29 00:37:17 +01:00
Oliver Voelker 8e85ef9822 es werden noch unzip, libncurses-dev und gawk fuer einen erfolgreichen Build benoetigt. 2014-10-27 16:26:18 +01:00
Oliver Voelker 2e0c1c24dd Update README.md
Das Paket build-essential sollte auch installiert sein.
2014-10-27 13:09:45 +01:00
Alexander Wunschik ce3b3da6a9 Merge pull request #6 from magenbrot/master
README.md erstellt
2014-10-27 09:59:39 +01:00
Oliver Voelker af7effdd7d Update README.md 2014-10-27 09:56:37 +01:00
Oliver Voelker 5f65e5b152 style fixes 2014-10-27 09:35:18 +01:00
Oliver Voelker faeb432fc2 new README.md
aus dem Wiki kopiert
2014-10-27 09:23:12 +01:00
Alexander Wunschik 9ea763e517 Merge pull request #5 from magenbrot/master
durch das fehlende $ wurde die uci variable nicht korrekt gesetzt; sysupgrade skript ergänzt
2014-10-26 21:49:43 +01:00
Oliver Voelker 2752dd9760 neues Script fuer komfortablere Firmwareupgrades.
Auszufuehren ueber: /etc/sysupgrade.sh
2014-10-26 21:38:24 +01:00
Oliver Voelker 23161285b3 durch das fehlende $ wurde die uci variable nicht korrekt gesetzt.
der Update-Prozess laesst sich nun deutlich verkuerzen:

FILE="openwrt-ar71xx-generic-`uci get board.model.name`-squashfs-sysupgrade.bin"
echo "Loading $FILE"
cd /tmp/
wget http://$(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface)/dev/firmware/current/${FILE}
wget http://$(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface)/dev/firmware/current/${FILE}.md5
md5sum -c ${FILE}.md5 && sysupgrade ${FILE}
2014-10-26 13:43:02 +01:00
329 changed files with 9690 additions and 18346 deletions

20
.gitignore vendored
View File

@ -1,5 +1,15 @@
selected_bsp
selected_community
src
build
bin
/selected_bsp
/selected_community
/selected_variant
/build
/bin*
/src/dl
/src/openwrt
/src/packages/fastd
/src/packages/wlanslovenija
/src/packages/openwrt
/src/packages/gluon
/src/packages/routing
/.project
/*.patch
/.mailmap

356
LICENSES/GPL-2.0 Normal file
View File

@ -0,0 +1,356 @@
Valid-License-Identifier: GPL-2.0-only
Valid-License-Identifier: GPL-2.0
Valid-License-Identifier: GPL-2.0-or-later
Valid-License-Identifier: GPL-2.0+
SPDX-URL: https://spdx.org/licenses/GPL-2.0-only.html
SPDX-URL: https://spdx.org/licenses/GPL-2.0-or-later.html
Usage-Guide:
To use this license in source code, put one of the following SPDX
tag/value pairs into a comment according to the placement
guidelines in the licensing rules documentation.
For 'GNU General Public License (GPL) version 2 only' use:
SPDX-License-Identifier: GPL-2.0-only
For 'GNU General Public License (GPL) version 2 or any later version' use:
SPDX-License-Identifier: GPL-2.0-or-later
License-Text:
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

690
LICENSES/GPL-3.0 Normal file
View File

@ -0,0 +1,690 @@
Valid-License-Identifier: GPL-3.0-only
Valid-License-Identifier: GPL-3.0
Valid-License-Identifier: GPL-3.0-or-later
Valid-License-Identifier: GPL-3.0+
SPDX-URL: https://spdx.org/licenses/GPL-3.0-only.html
SPDX-URL: https://spdx.org/licenses/GPL-3.0-or-later.html
Usage-Guide:
To use this license in source code, put one of the following SPDX
tag/value pairs into a comment according to the placement
guidelines in the licensing rules documentation.
For 'GNU General Public License (GPL) version 3 only' use:
SPDX-License-Identifier: GPL-3.0-only
For 'GNU General Public License (GPL) version 3 or any later version' use:
SPDX-License-Identifier: GPL-3.0-or-later
License-Text:
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

143
README.md Normal file
View File

@ -0,0 +1,143 @@
firmware
========
# Was ist Freifunk?
Freifunk ist eine nicht-kommerzielle Initiative für freie Funknetzwerke. Jeder Nutzer im Freifunk-Netz stellt einen günstigen WLAN-Router für sich selbst und den Datentransfer der anderen Teilnehmer zur Verfügung. Dieses Netzwerk kann von jedem genutzt werden.
Weitere Informationen gibt es auf <https://freifunk.net/> und auf <https://wiki.freifunk-franken.de/w/Hauptseite>.
# Firmware selbst kompilieren
## Voraussetzungen
* `apt-get install zlib1g-dev lua5.2 build-essential unzip libncurses-dev gawk git subversion libssl-dev` (Sicherlich müssen noch mehr Abhängigkeiten installiert werden, diese Liste wird sich hoffentlich nach und nach füllen. Ein erster Ansatzpunkt sind die Abhängigkeiten von OpenWrt selbst)
* `git clone https://git.freifunk-franken.de/freifunk-franken/firmware.git`
* `cd firmware`
## Erste Schritte
Je nachdem, für welche Hardware die Firmware gebaut werden soll, muss das BSP gewählt werden:
* `./buildscript selectbsp bsp/ath79-generic.bsp`
* Um die vorhandenen BSPs zu sehen, kann `./buildscript selectbsp help` ausgeführt werden.
## Was ist ein BSP?
Ein BSP (Board-Support-Package) beschreibt, was zu tun ist, damit ein Firmware Image für eine spezielle Hardware gebaut werden kann.
Typischerweise besteht ein bsp aus:
* target-subtarget.bsp
* target-subtarget/.config
Die Daten des BSP werden nie alleine verwendet. Zuerst werden immer die Daten aus dem "default"-BSP zum Ziel kopiert, erst danach werden die Daten des eigentlichen BSPs dazu kopiert. Durch diesen Effekt kann ein BSP die "default" Daten überschreiben.
## Die Verwendung des Buildscripts
Die BSP-Datei wird durch das Buildscript automatisch als dot-Script geladen, somit stehen dort alle Funktionen zur Verfügung.
Das Buildscript generiert ein dynamisches sed-Script. Dies geschieht, damit die Templates mit den richtigen Werten gefüllt werden können.
### `./buildscript selectvariant`
Hier wählt man aus ob man Node Firmware oder Layer3 Firmware bauen möchte:
* `./buildscript selectvariant [node/layer3]`
* Um die verschiedenen Varianten zu sehen, kann `./buildscript selectvariant help` ausgeführt werden.
### `./buildscript prepare`
* Sourcen werden in einen separaten src-Folder geladen, sofern diese nicht schon da sind. Zu den Sourcen zählen folgende Komponenten:
* OpenWrt
* Sämtliche Packages (ggf. werden Patches angewandt)
* Eine OpenWrt Feed-Config wird mit dem lokalen Source Verzeichnis als Quelle angelegt
* Die Feeds werden geladen
* Spezielle Auswahl an Paketen wird geladen
* Patches werden angewandt
* board_prepare() aus dem BSP wird aufgerufen (wird z.B. für Patches für eine bestimmte Hardware verwendet)
### `./buildscript config openwrt`
Um das Arbeiten mit den .config-Dateien von OpenWrt zu vereinfachen, bietet das Buildscript die Möglichkeit das `menuconfig` von OpenWrt aufzurufen. Nachdem man die gewünschten Einstellungen vorgenommen hat, hat man die Möglichkeit, die frisch editierte Konfiguration in das BSP zu übernehmen.
Dieses Kommando arbeitet folgendermaßen:
* prebuild
* OpenWrt: `make menuconfig`
* Speichern, y/n?
* Config-Format vereinfachen
* Config ins BSP zurück speichern
### `./buildscript updatefeeds`
Aktualisiert die OpenWrt Feeds für zusätzliche Pakete, die in die Firmware eingebaut werden. Dabei werden die Referenzen im build/ Verzeichnis aktualisiert. Dieser Schritt wird bereits von `./buildscript prepare` übernommen, daher ist dies nur bei manuellen Änderungen der Feeds nötig.
### `./buildscript build`
Sollte man am besten mit Hilfe des Tools 'screen' oder ähnlichem laufen lassen um einen Abbruch des Builds bei Verbindungsproblemen oder ähnlichem zu verhindern.
* prebuild
* $target/files aufräumen
* (In $target/files liegen Dateien, die später direkt im Ziel-Image landen)
* Files aus default-bsp und bsp kopieren
* OpenWrt- und Kernel-Config kopieren
* board_prebuild() aus dem BSP wird aufgerufen
* Templates transformieren
* GIT Versionen speichern: $target/files/etc/firmware_release
* OpenWrt: make
* postbuild
* board_postbuild() wird aufgerufen
### `./buildscript buildall`
Kann verwendet werden um für alle BSPs Firmware zu bauen. Das kann jedoch mehrere Stunden dauern.
## Erweiterung eines BSPs
Beispielhaftes Vorgehen um den WR1043V2 zu unterstützen.
### Repository auschecken
```
git clone https://git.freifunk-franken.de/freifunk-franken/firmware.git
cd firmware
```
### Erste Images erzeugen
Du fügst die Dateinamen der Images, die zusätzlich kopiert werden sollen, in das `images`-Array ein. Hierbei können Wildcards verwendet werden, um z.B. sysupgrade.bin und ggf. meherere factory.bin Ergebnisse aus dem OpenWrt Buildverzeichnis in unser Buildverzeichnis zu kopieren.
```
vim bsp/ath79-generic.bsp
images=(
// ...
openwrt-${chipset}-${subtarget}-tl-wr1043nd-v2-squashfs-*"
// ...
)
```
Dann muss auf jeden Fall noch das Netzwerk richtig konfiguriert werden. Dazu muss man den Router sehr gut kennen, i.d.R. lernt man den erst beim Verwenden kennen, daher ist ein guter Startpunkt die Config vom v1 zu kopieren und erstmal zu gucken was passiert.
Wichtig: Zur Laufzeit wird (wenn keine Anpassung in fff-boardname vorgenommen wurde) die Datei `network.$(cat /var/sysinfo/board_name)` geladen. Um den richtigen Dateinamen zu bestimmen kann zunächst ein normales OpenWrt in der gleichen Version auf den Router installiert werden; dort kan man sich dann diese Datei ansehen.
```
cd src/packages/fff/fff-network/mips
cp network.tplink,wr1043nd-v1 network.tplink,wr1043nd-v2
```
Anschließend kann ein erstes Image erzeugt werden:
```
./buildscript selectbsp bsp/ath79-generic.bsp
./buildscript prepare
./buildscript build
```
Jetzt gehst du n Kaffee trinken.
### Netzwerkeinstellungen korrekt setzen
Am Ende sollte im bin/ Verzeichnis unter anderem das Image für v1 und v2 liegen. Das v2 Image wird auf den Router geflasht. Achtung: Eventuell ist das Netzwerk jetzt so falsch eingestellt, dass man nicht mehr über Netzwerk auf den Router zugreifen kann. Am einfachsten ist es den Router dann über eine serielle Konsole zu verwenden. Alternativ kann aber auch der OpenWrt Failsafe Modus verwendet werden, dort werden unsere Netzwerkeinstellungen nicht angewendet. Außerdem kann man an den unterschiedlichen LAN-Ports mit der IPv6 Link-Local aus der MAC Adresse des Geräts versuchen drauf zu kommen. Es kann auch sein, dass die IPv6 +/- 1 am Ende hat. Letztlich kann das funktionieren, die serielle Konsole ist hier aber häufig einfacher!
Wenn man dann auf dem Router drauf ist, muss als erstes festgestellt werden, welches Ethernet-Device für den WAN Port zuständig ist. Mir sind da folgende Möglichkeiten bekannt. a) WAN ist eth0, b) WAN ist eth1, c) WAN ist teil vom Switch eth0. Dementsprechend wird das WANDEV auf dem Router in der /etc/network.tl-wr1043nd-v2 konfiguriert. Wenn WAN ein eigenes ethX hat, dann muss WAN_PORTS="" sein. Dann muss eingestellt werden welches Ethernet-Device an dem internen Switch angeschlossen ist (swconfig list). Dieses wird als SWITCHDEV konfiguriert. Es muss noch eingestellt werden, welches Ethernet oder Wifi Device die MAC Adresse hat, die auch unter dem Gerät steht. Dieses Device wird als ROUTERMAC eingetragen. Nun ist es an der Zeit die Einstellungen zu testen, dafür muss die falsche Netzwerk-Config zurück gesetzt werden:
```
cp /rom/etc/config/network /etc/config/network
reboot
```
### Switch konfigurieren
Wenn der Router wieder hochgefahren ist, sollten die Einstellungen sein, so wie sie konfiguriert wurden. Gegebenenfalls muss man hier noch mal eine Runde drehen, wenn etwas nicht richtig war. Ansonsten ist es jetzt an der Zeit den Switch einzustellen. Das geht am einfachsten, wenn man die Einstellungen nun direkt in der /etc/config/network vornimmt. Dabei ist eth0_2 der WAN Port (sofern er über den Switch läuft). eth0_1 sind die Client-Ports und eth0_3 sind die Ports um Batman Knoten zu verbinden. Am Anfang weiß man meist noch nicht welcher Switch Port wirklich am Router wo rausgeführt ist. Manchmal kann es helfen einen Port nach dem anderen aktiv zu schalten (Rechner anstecken) und die Ausgabe von swconfig anzugucken (z.B. `swconfig dev switch0 show`). Das ganze ist manchmal ein wenig try-and-error. :( Aber wenn man denkt es passt, prüft man alles durch. Tauchen BATMAN Nachbarn in `batctl o` auf und aktualisiert sich die Anzeige, wenn ein anderer Knoten an dem Batman-Port angeschlossen wird? Funktioniert das mit beiden Ports? Taucht ein PC in `/etc/showmacs.sh br-mesh` auf, den man an die Client-Ports angeschlossen hat? Wenn am Ende alles passt, übernimmt man die Switch-Config in die /etc/network.tl-wr1043nd-v2 und probiert das ganze nochmal aus:
```
cp /rom/etc/config/network /etc/config/network
reboot
```
### Einstellungen testen und ins BSP übernehmen
Wenn jetzt die Ports immer noch alle korrekt funktionieren kann man die Datei auf den eigenen PC kopieren:
```
scp root@[ipv6ll%scope]:/etc/network.tl-wr1043nd-v2 /path/to/git/firmware/bsp/wr1043nd/root_file_system/etc/network.tl-wr1043nd-v2
```
### BSP commiten und Patch erzeugen
Nun kann man mit `git status` die Änderungen sehen. Mit `git add` staged man diese und mit `git commit` checkt man sie ein. `git format-patch origin/HEAD` erzeugt dann aus deinen Commits ein (oder mehr) Patches. Diese schickst du dann mit `git send-email --to franken-dev@freifunk.net *.patch` an unsere Liste. Dort nimmt sich jemand die Zeit und schaut kurz drüber und wenn alles passt finden deine Änderungen in den Hauptentwicklungszweig und sind ab dann Teil der Freifunk-Franken-Firmware.
### Patch schicken
Auf der Mailingliste franken-dev@freifunk.net kannst du natürlich jederzeit Fragen stellen, falls etwas nicht klar sein sollte.
## Hinzufügen von Paketen zum Image
Das Hinzufügen von Paketen sollte mit Bedacht erfolgen, da dies (bei unvorsichtiger Konfiguration) den Betrieb des Routers und eventuell des Freifunk-Netzes beeinträchtigen könnte.
Mit dem Firmware-Verzeichnis als Arbeitsverzeichnis kann mittels des Befehls `./build/<target>/scripts/feeds install <paket>` ein Paket zur menuconfig hinzugefügt werden.
Mittels des schon bekannten `./buildscript config openwrt` kann das Paket dann ausgewählt werden. Es wird beim anschließenden Build zum Image hinzugefügt.

24
bsp/ath79-generic.bsp Normal file
View File

@ -0,0 +1,24 @@
chipset=ath79
subtarget=generic
images=("openwrt-${chipset}-${subtarget}-glinet_gl-ar150-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_archer-c25-v1-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_archer-c60-v1-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_archer-c60-v2-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_archer-c7-v2-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_archer-c7-v5-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_cpe210-v1-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_cpe210-v2-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_cpe210-v3-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_cpe510-v1-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr3500-v1-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr3600-v1-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr4300-v1-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr4310-v1-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v2-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v3-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wr1043nd-v4-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wr1043n-v5-squashfs-*"
"openwrt-${chipset}-${subtarget}-ubnt_nanostation-loco-m-xw-squashfs-*"
"openwrt-${chipset}-${subtarget}-ubnt_unifi-squashfs-*"
"openwrt-${chipset}-${subtarget}-ubnt_unifiac-mesh-squashfs-*"
)

98
bsp/ath79-generic/.config Normal file
View File

@ -0,0 +1,98 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_generic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_glinet_gl-ar150=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_glinet_gl-ar150=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c25-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c25-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v2=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v2="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v2=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v2="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v5=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v5="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe210-v1="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v2=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe210-v2="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v3=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe210-v3="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe510-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_cpe510-v1="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr3500-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr3500-v1=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr3600-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr3600-v1=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr4300-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr4300-v1=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wdr4310-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wdr4310-v1=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v1=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v2=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v2=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v3=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v3=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043nd-v4=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043nd-v4=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr1043n-v5=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr1043n-v5=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr710n-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr710n-v1=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_tl-wr842n-v2=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_tl-wr842n-v2=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_bullet-m-ar7240=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_bullet-m-ar7240="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_bullet-m-ar7241=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_bullet-m-ar7241="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-loco-m=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-loco-m="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-loco-m-xw=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-loco-m-xw="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanostation-m=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_nanostation-m="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_picostation-m=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_picostation-m="-rssileds"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_unifi=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_unifi=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_unifiac-mesh=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_ubnt_unifiac-mesh="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_DROPBEAR_CURVE25519 is not set
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=1
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_hostapd-mini=y
CONFIG_PACKAGE_iwinfo=m
CONFIG_PACKAGE_libiwinfo=m
CONFIG_PACKAGE_opkg=m
CONFIG_PACKAGE_wpad-mini=m
CONFIG_PACKAGE_ath10k-firmware-qca9887=m
CONFIG_PACKAGE_ath10k-firmware-qca9888=m
CONFIG_PACKAGE_ath10k-firmware-qca988x=m
CONFIG_PACKAGE_kmod-ath10k-smallbuffers=m
CONFIG_PACKAGE_kmod-ath10k=m
CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m
CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m
CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers=m
CONFIG_PACKAGE_kmod-ath10k-ct=m
CONFIG_STRIP_KERNEL_EXPORTS=y

View File

@ -1,34 +0,0 @@
machine=wdr4300
target=$builddir/$machine
board_prepare() {
echo "nothing todo" > /dev/null
}
board_prebuild() {
echo "nothing todo" > /dev/null
}
board_postbuild() {
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-factory.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-sysupgrade.bin ./bin/
}
board_flash() {
echo "nothing implemented"
}
board_clean() {
/bin/rm -rf $target bin/*$machine*
}

View File

@ -1,25 +0,0 @@
machine=wdr4900
target=$builddir/$machine
board_prepare() {
echo "nothing todo" > /dev/null
}
board_prebuild() {
echo "nothing todo" > /dev/null
}
board_postbuild() {
cp $target/bin/mpc85xx/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-factory.bin ./bin/
cp $target/bin/mpc85xx/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-sysupgrade.bin ./bin/
}
board_flash() {
echo "nothing implemented"
}
board_clean() {
/bin/rm -rf $target bin/*$machine*
}

View File

@ -1,25 +0,0 @@
machine=wr1043nd
target=$builddir/$machine
board_prepare() {
echo "nothing todo" > /dev/null
}
board_prebuild() {
echo "nothing todo" > /dev/null
}
board_postbuild() {
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-sysupgrade.bin ./bin/
}
board_flash() {
echo "nothing implemented"
}
board_clean() {
/bin/rm -rf $target bin/*$machine*
}

View File

@ -1,24 +0,0 @@
machine=wr740n
target=$builddir/$machine
board_prepare() {
echo "nothing todo" > /dev/null
}
board_prebuild() {
echo "nothing todo" > /dev/null
}
board_postbuild() {
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-*.bin ./bin/
}
board_flash() {
echo "nothing implemented"
}
board_clean() {
/bin/rm -rf $target bin/*$machine*
}

View File

@ -1,25 +0,0 @@
machine=wr741
target=$builddir/$machine
board_prepare() {
echo "nothing todo" > /dev/null
}
board_prebuild() {
echo "nothing todo" > /dev/null
}
board_postbuild() {
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v2-squashfs-*.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v4-squashfs-*.bin ./bin/
}
board_flash() {
echo "nothing implemented"
}
board_clean() {
/bin/rm -rf $target bin/*$machine*
}

View File

@ -1,26 +0,0 @@
machine=wr841
target=$builddir/$machine
board_prepare() {
echo "nothing todo" > /dev/null
}
board_prebuild() {
echo "nothing todo" > /dev/null
}
board_postbuild() {
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-*.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-*.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v9-squashfs-*.bin ./bin/
}
board_flash() {
echo "nothing implemented"
}
board_clean() {
/bin/rm -rf $target bin/*$machine*
}

View File

@ -6,4 +6,8 @@
Welcome to the free wireless experience
More information at http://franken.freifunk.net
Data protection notes may be found in:
/etc/dataprotection.en (in English)
/etc/dataprotection.de (in German)
---------------------------------------------------------

View File

@ -1 +0,0 @@
../tmp/bat-hosts

View File

@ -1,12 +0,0 @@
config 'mesh' 'bat0'
option 'aggregated_ogms'
option 'ap_isolation'
option 'bonding'
option 'fragmentation'
option 'gw_bandwidth'
option 'gw_mode'
option 'gw_sel_class'
option 'log_level'
option 'orig_interval'
option 'vis_mode'
option 'bridge_loop_avoidance' '0'

View File

@ -1 +0,0 @@
config model 'model'

View File

@ -1,24 +0,0 @@
config 'script'
option 'error_level' '0'
option 'logfile' '/var/log/configurator.log'
option 'version' '1'
option 'sync_hostname' '1'
config 'api'
option 'ipv4_address' '1'
option 'ipv6_interface' 'br-mesh'
option 'ipv6_address' '${NETMON_IP}'
option 'timeout' '5'
option 'retry' '5'
option 'api_key' '1'
config 'crawl'
option 'method' 'hash'
option 'nickname' '1'
option 'password' '1'
option 'login_string' '1'
option 'router_id' '1'
option 'update_hash' '1'
config 'netmon'
option 'autoadd_ipv6_address' '1'

View File

@ -1,33 +0,0 @@
config dnsmasq
option domainneeded 1
option boguspriv 1
option filterwin2k '0' #enable for dial on demand
option localise_queries 1
option local '/lan/'
option domain 'lan'
option expandhosts 1
option nonegcache 0
option authoritative 0
option readethers 1
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
#list server '/mycompany.local/1.2.3.4'
#option nonwildcard 1
#list interface br-lan
#list notinterface lo
#config dhcp mesh
# option interface mesh
# option start X.10
# option limit 100
# option leasetime 6h
config dhcp lan
option interface lan
option start 100
option limit 150
option leasetime 12h
config dhcp wan
option interface wan
option ignore 1

View File

@ -1,4 +0,0 @@
config dropbear
option PasswordAuth 'on'
option Port '22'
# option BannerFile '/etc/banner'

View File

@ -1,103 +0,0 @@
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name lan
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name wan
option input REJECT
option output ACCEPT
option forward REJECT
option masq 1
option mtu_fix 1
config forwarding
option src lan
option dest wan
# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
option src wan
option proto udp
option dest_port 68
option target ACCEPT
#Allow ping
config rule
option src wan
option proto icmp
option icmp_type echo-request
option target ACCEPT
#Allow SSH on WAN
config rule
option src wan
option dest_port 22
option target ACCEPT
option proto tcp
# include a file with users custom iptables rules
config include
option path /etc/firewall.user
### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
# option src lan
# option src_ip 192.168.45.2
# option dest wan
# option proto tcp
# option target REJECT
# block a specific mac on wan
#config rule
# option dest wan
# option src_mac 00:11:22:33:44:66
# option target REJECT
# block incoming ICMP traffic on a zone
#config rule
# option src lan
# option proto ICMP
# option target DROP
# port redirect port coming in on wan to lan
#config redirect
# option src wan
# option src_dport 80
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
# option proto tcp
### FULL CONFIG SECTIONS
#config rule
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 80
# option dest wan
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
# option target REJECT
#config redirect
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 1024
# option src_dport 80
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp

View File

@ -1,4 +0,0 @@
config upgrade 'upgrade'
option path '${UPGRADE_PATH}'
option auto 0
option remote 1

View File

@ -1,27 +0,0 @@
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'w2mesh'
option mtu '1532'
option proto 'batadv'
option mesh 'bat0'
config interface 'mesh'
option type 'bridge'
option auto '1'
config interface 'wan'
option proto 'dhcp'
option ifname 'eth1'
config interface 'ethmesh'
option mtu '1532'
option proto 'batadv'
option mesh 'bat0'
config interface 'bat'
option ifname 'bat0'
option mtu '1500'

View File

@ -1,8 +0,0 @@
config 'script'
option 'version' '25'
option 'error_level' '0'
option 'logfile' '/var/log/nodewatcher.log'
option 'data_file' '/tmp/crawldata/node.data'
config 'network'
option 'mesh_interface' 'br-mesh'

View File

@ -1,86 +0,0 @@
# QoS configuration for OpenWrt
# INTERFACES:
config interface wan
option classgroup "Default"
option enabled 1
option overhead 1
option upload 128
option download 1024
# RULES:
config classify
option target "Bulk"
option layer7 "edonkey"
config classify
option target "Bulk"
option layer7 "bittorrent"
config classify
option target "Priority"
option ports "22,53"
config classify
option target "Normal"
option proto "tcp"
option ports "20,21,25,80,110,443,993,995"
config classify
option target "Express"
option ports "5190"
config default
option target "Express"
option proto "udp"
option pktsize "-500"
config reclassify
option target "Priority"
option proto "icmp"
config default
option target "Bulk"
option portrange "1024-65535"
config reclassify
option target "Priority"
option proto "tcp"
option pktsize "-128"
option mark "!Bulk"
option tcpflags "SYN"
config reclassify
option target "Priority"
option proto "tcp"
option pktsize "-128"
option mark "!Bulk"
option tcpflags "ACK"
# Don't change the stuff below unless you
# really know what it means :)
config classgroup "Default"
option classes "Priority Express Normal Bulk"
option default "Normal"
config class "Priority"
option packetsize 400
option maxsize 400
option avgrate 10
option priority 20
config class "Priority_down"
option packetsize 1000
option avgrate 10
config class "Express"
option packetsize 1000
option maxsize 800
option avgrate 50
option priority 10
config class "Normal"
option packetsize 1500
option packetdelay 100
option avgrate 10
option priority 5
config class "Normal_down"
option avgrate 20
config class "Bulk"
option avgrate 1
option packetdelay 200

View File

@ -1,12 +0,0 @@
config location 'location'
option latitude 0
option longitude 0
option elevation 0
option direction ''
option tags 'indoor omnidirectional'
config contact 'contact'
option name ''
option email ''
option telephone ''

View File

@ -1,29 +0,0 @@
config 'system'
option 'hostname' 'OpenWrt'
option 'timezone' 'CET-1CEST,M3.5.0,M10.5.0/3'
config 'led' 'status_led_green'
option 'name' 'status'
option 'sysfs' 'tp-link:green:system'
option 'trigger' 'heartbeat'
config 'led' 'status_led_blue'
option 'name' 'status'
option 'sysfs' 'tp-link:blue:system'
option 'trigger' 'heartbeat'
config 'led' 'led_vpn_green'
option 'name' 'VPN'
option 'sysfs' 'tp-link:green:qss'
option 'trigger' 'netdev'
option 'dev' '${VPN_PROJECT}VPN'
option 'mode' 'link'
config 'led' 'led_vpn_blue'
option 'name' 'VPN'
option 'sysfs' 'tp-link:blue:qss'
option 'trigger' 'netdev'
option 'dev' '${VPN_PROJECT}VPN'
option 'mode' 'link'
# vim: noexpandtab

View File

@ -1,2 +0,0 @@
config timeserver
option hostname time.fu-berlin.de

View File

@ -1,25 +0,0 @@
config wifi-device radio0
option type mac80211
option channel ${BATMAN_CHANNEL}
option phy phy0
option hwmode 11ng
config wifi-iface
option device radio0
option network w2mesh
option ifname w2mesh
option mode adhoc
option bssid '${BSSID_MESH}'
option ssid '${ESSID_MESH}'
option mcast_rate 6000
# option bintval 1000
option 'encryption' 'none'
option 'hidden' '1'
config wifi-iface
option device radio0
option network mesh
option ifname w2ap
option mode ap
option ssid '${ESSID_AP}'
option 'encryption' 'none'

View File

@ -1,174 +0,0 @@
#!/bin/sh
# Netmon Configurator (C) 2010-2012 Freifunk Oldenburg
# Lizenz: GPL v3
test -f /tmp/started || exit
#Get the configuration from the uci configuration file
#If it does not exists, then get it from a normal bash file with variables.
if [ -f /etc/config/configurator ];then
API_IPV4_ADRESS=`uci get configurator.@api[0].ipv4_address`
API_IPV6_ADRESS=`uci get configurator.@api[0].ipv6_address`
API_IPV6_INTERFACE=`uci get configurator.@api[0].ipv6_interface`
API_TIMEOUT=`uci get configurator.@api[0].timeout`
API_RETRY=`uci get configurator.@api[0].retry`
SCRIPT_VERSION=`uci get configurator.@script[0].version`
SCRIPT_ERROR_LEVEL=`uci get configurator.@script[0].error_level`
SCRIPT_LOGFILE=`uci get configurator.@script[0].logfile`
SCRIPT_SYNC_HOSTNAME=`uci get configurator.@script[0].sync_hostname`
CRAWL_METHOD=`uci get configurator.@crawl[0].method`
CRAWL_ROUTER_ID=`uci get configurator.@crawl[0].router_id`
CRAWL_UPDATE_HASH=`uci get configurator.@crawl[0].update_hash`
CRAWL_NICKNAME=`uci get configurator.@crawl[0].nickname`
CRAWL_PASSWORD=`uci get configurator.@crawl[0].password`
AUTOADD_IPV6_ADDRESS=`uci get configurator.@netmon[0].autoadd_ipv6_address`
else
. `dirname $0`/configurator_config
fi
API_RETRY=$(($API_RETRY - 1))
if [[ $API_IPV4_ADRESS != "1" ]]; then
netmon_api=$API_IPV4_ADRESS
else
netmon_api="[$API_IPV6_ADRESS"%"$API_IPV6_INTERFACE]"
fi
if [ $SCRIPT_ERROR_LEVEL -gt "1" ]; then
err() {
echo "$(date) [configurator]: $1" >> $SCRIPT_LOGFILE
}
else
err() {
:
}
fi
sync_hostname() {
err "Syncing hostname"
api_return=$(wget -T $API_TIMEOUT -q -O - "http://$netmon_api/api_csv_configurator.php?section=get_hostname&authentificationmethod=$CRAWL_METHOD&nickname=$CRAWL_NICKNAME&password=$CRAWL_PASSWORD&router_auto_update_hash=$CRAWL_UPDATE_HASH&router_id=$CRAWL_ROUTER_ID")
ret=${api_return%%,*}
if [ "$ret" != "success" ]; then
err "Ther was an error fetching the hostname"
exit 0
elif [ "$ret" = "success" ]; then
netmon_hostname=${api_return%,*}
netmon_hostname=${netmon_hostname#*,}
#check for valid hostname as specified in rfc 1123
#see http://stackoverflow.com/a/3824105
regex='^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])'
regex=$regex'(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$'
if [ ${#netmon_hostname} -le 255 ]; then
if echo -n $netmon_hostname | egrep -q "$regex"; then
if [ "$netmon_hostname" != "`cat /proc/sys/kernel/hostname`" ]; then
err "Setting new hostname: $netmon_hostname"
uci set system.@system[0].hostname=$netmon_hostname
uci commit
echo $netmon_hostname > /proc/sys/kernel/hostname
else
err "Hostname is up to date"
fi
else
err "Hostname ist malformed"
exit 0
fi
else
err "Hostname exceeds the maximum length of 255 characters"
exit 0
fi
fi
}
assign_router() {
hostname=`cat /proc/sys/kernel/hostname`
#Choose right login String
#Here maybe a ; to much at the end..??
login_strings=$(awk '{ mac=toupper($1); gsub(":", "", mac); printf mac ";" }' /sys/class/net/br-mesh/address /sys/class/net/eth0/address /sys/class/net/ath0/address 2> /dev/null)
ergebnis=$(wget -T $API_TIMEOUT -q -O - "http://$netmon_api/api_csv_configurator.php?section=test_login_strings&login_strings=$login_strings")
router_auto_assign_login_string=${ergebnis#*;}
ergebnis=${ergebnis%;*}
if [ "$ergebnis" = "error" ]; then
router_auto_assign_login_string=${login_strings%%;*}
err "A router with this login string does not exist: $login_strings"
err "Using $router_auto_assign_login_string as login string"
fi
#Try to assign Router with choosen login string
ergebnis=$(wget -T $API_TIMEOUT -q -O - "http://$netmon_api/api_csv_configurator.php?section=router_auto_assign&router_auto_assign_login_string=$router_auto_assign_login_string&hostname=$hostname")
ret=${ergebnis%%;*}
errstr=${ergebnis#*;}
errstr=${errstr%%;*}
if [ "$ret" != "success" ]; then
err "The router has not been assigned to a router in Netmon"
err "Failure on router_auto_assign: $errstr. Exiting"
exit 0
elif [ "$ret" = "success" ]; then
update_hash=${ergebnis%;*;*}
update_hash=${update_hash##*;}
api_key=${ergebnis##*;}
#write new config
uci set configurator.@crawl[0].router_id=$errstr
uci set configurator.@crawl[0].update_hash=$update_hash
uci set configurator.@api[0].api_key=$api_key
#set also new router id for nodewatcher
#uci set nodewatcher.@crawl[0].router_id=$errstr
err "The router $errstr has been assigned with a router in Netmon"
uci commit
CRAWL_METHOD=`uci get configurator.@crawl[0].method`
CRAWL_ROUTER_ID=$errstr
CRAWL_UPDATE_HASH=$update_hash
CRAWL_NICKNAME=`uci get configurator.@crawl[0].nickname`
CRAWL_PASSWORD=`uci get configurator.@crawl[0].password`
fi
}
autoadd_ipv6_address() {
err "Doing IPv6 autoadd"
ipv6_link_local_addr=$(ip addr show dev br-mesh scope link | awk '/inet6/{print $2}')
ipv6_link_local_netmask=${ipv6_link_local_addr##*/}
ipv6_link_local_addr=${ipv6_link_local_addr%%/*}
ergebnis=$(wget -T $API_TIMEOUT -q -O - "http://$netmon_api/api_csv_configurator.php?section=autoadd_ipv6_address&authentificationmethod=$CRAWL_METHOD&nickname=$CRAWL_NICKNAME&password=$CRAWL_PASSWORD&router_auto_update_hash=$CRAWL_UPDATE_HASH&router_id=$CRAWL_ROUTER_ID&networkinterface_name=br-mesh&ip=$ipv6_link_local_addr&netmask=$ipv6_link_local_netmask&ipv=6")
ret=${ergebnis%%,*}
if [ "$ret" = "success" ]; then
uci set configurator.@netmon[0].autoadd_ipv6_address='0'
uci commit
err "The IPv6 address of the router $CRAWL_ROUTER_ID has been added to the router in Netmon"
err "IPv6 Autoadd has been disabled cause it is no longer necesarry"
else
routerid=${ergebnis##*,}
if [ "$routerid" == "$CRAWL_ROUTER_ID" ]; then
err "The IPv6 address already exists in Netmon on this router. Maybe because of a previos assignment"
uci set configurator.@netmon[0].autoadd_ipv6_address='0'
uci commit
err "IPv6 Autoadd has been disabled cause it is no longer necesarry"
else
err "The IPv6 address already exists in Netmon on another router $routerid"
fi
fi
}
if [ $CRAWL_METHOD == "login" ]; then
err "Authentification method is: username and passwort"
elif [ $CRAWL_METHOD == "hash" ]; then
err "Authentification method: autoassign and hash"
err "Checking if the router is already assigned to a router in Netmon"
if [ $CRAWL_UPDATE_HASH == "1" ]; then
err "The router is not assigned to a router in Netmon"
err "Trying to assign the router"
assign_router
else
err "The router is already assigned to a router in Netmon"
fi
fi
if [[ $AUTOADD_IPV6_ADDRESS = "1" ]]; then
autoadd_ipv6_address
fi
if [[ $SCRIPT_SYNC_HOSTNAME = "1" ]]; then
sync_hostname
fi

View File

@ -1,7 +0,0 @@
*/5 * * * * sh /etc/fastdstart.sh; sh /etc/nodewatcher.sh; sh /etc/configurator.sh; sh /etc/wlanwatchdog.sh >> /var/log/wlanwatchdog.log 2>&1
#15 01 * * * rdate -s time.fu-berlin.de > /dev/null
#Enable zapp script if you are running a gateway
#*/1 * * * * /etc/init.d/zapp

View File

@ -1,54 +0,0 @@
#!/bin/ash
# functions
#FIXME: define here your favorite methods to get the values
get_wlan_client_interface() {
echo "wlan0"
}
get_wlan_mesh_interface() {
echo "wlan0-1"
}
get_eth_client_interface() {
echo ""
}
get_eth_mesh_interface() {
echo ""
}
get_bridge_interface() {
echo "br-mesh"
}
get_batman_interface() {
echo "bat0"
}
get_vpn_interface() {
test -f /etc/fastdstart.sh || exit;
local $(grep -o project=.* /etc/fastdstart.sh)
echo ${project}VPN | tr -d '"'
}
get_debug_level() {
echo "0"
}
print_definitions() {
echo "# interfaces"
echo "WLAN_CLIENT_INTERFACE=$(get_wlan_client_interface)"
echo "WLAN_MESH_INTERFACE=$(get_wlan_mesh_interface)"
echo "ETH_CLIENT_INTERFACE=$(get_eth_client_interface)"
echo "ETH_MESH_INTERFACE=$(get_eth_mesh_interface)"
echo "BRIDGE_INTERFACE=$(get_bridge_interface)"
echo "BATMAN_INTERFACE=$(get_batman_interface)"
echo "VPN_INTERFACE=$(get_vpn_interface)"
echo ""
echo "# variables"
echo "DEBUG=$(get_debug_level)"
}
# program
print_definitions

View File

@ -1,93 +0,0 @@
#!/bin/sh
SERVER="no"
#SERVERNAME="--servername--"
project="${VPN_PROJECT}"
test_internet_host1="mastersword.de"
test_internet_host2="109.163.229.254"
if [ "$SERVER" == "no" ]; then
test -f /tmp/started || exit
fi
#Only do something with fastd when the router has internet connection
if ping -w5 -c3 "$test_internet_host1" &>/dev/null ||
ping -w5 -c3 "$test_internet_host2" &>/dev/null ||
ping6 -w5 -c3 heise.de &>/dev/null; then
mac=$(awk '{ mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address 2>/dev/null)
if [ "$SERVER" == "no" ]; then
hostname=$(cat /proc/sys/kernel/hostname)
if [ "$hostname" == "OpenWrt" ]; then
hostname=""
fi
if [ "$hostname" == "" ]; then
hostname=$mac
fi
else
hostname=$SERVERNAME
fi
if [ ! -d /etc/fastd ]; then
mkdir /etc/fastd
fi
if [ ! -d /etc/fastd/$project ]; then
mkdir /etc/fastd/$project
mkdir /tmp/fastd_${project}_peers
ln -s /tmp/fastd_${project}_peers /etc/fastd/$project/peers
echo "#!/bin/sh" > /etc/fastd/$project/up.sh
echo "ip link set up dev ${project}VPN" >> /etc/fastd/$project/up.sh
echo "echo enable > /sys/devices/virtual/net/${project}VPN/batman_adv/no_rebroadcast" >> /etc/fastd/$project/up.sh
echo "batctl if add ${project}VPN" >> /etc/fastd/$project/up.sh
chmod +x /etc/fastd/$project/up.sh
secret=$(fastd --generate-key 2>&1 | grep -i secret | awk '{ print $2 }')
echo "include peers from \"/etc/fastd/$project/peers\";" >> /etc/fastd/${project}/${project}.conf
echo "log to syslog level warn;" >> /etc/fastd/${project}/${project}.conf
echo "method \"null\";" >> /etc/fastd/${project}/${project}.conf
# http://lists.nord-west.net/pipermail/freifunk-ol-dev/2013-July/000322.html
# echo "bind 0.0.0.0:10000;" >> /etc/fastd/${project}/${project}.conf
echo "interface \"${project}VPN\";" >> /etc/fastd/${project}/${project}.conf
echo "mtu 1426;" >> /etc/fastd/${project}/${project}.conf
echo "secret \"$secret\";" >> /etc/fastd/${project}/${project}.conf
echo "on up \"/etc/fastd/${project}/up.sh\";" >> /etc/fastd/${project}/${project}.conf
echo "secure handshakes no;" >> /etc/fastd/${project}/${project}.conf
fi
if [ ! -d /tmp/fastd_${project}_peers ]; then
mkdir /tmp/fastd_${project}_peers
fi
pubkey=$(fastd -c /etc/fastd/$project/$project.conf --show-key --machine-readable)
# port=666
# fire up
if [ "$(/sbin/ifconfig -a | grep -i ethernet | grep $project)" == "" ]; then
/bin/rm /var/run/fastd.$project.pid
fastd -c /etc/fastd/$project/$project.conf -d --pid-file /var/run/fastd.$project.pid
fi
# register
wget -T15 "http://mastersword.de/~reddog/${project}/?mac=$mac&name=$hostname&port=$port&key=$pubkey" -O /tmp/fastd_${project}_output
filenames=$(awk '/^####/ { gsub(/^####/, "", $0); gsub(/.conf/, "", $0); print $0; }' /tmp/fastd_${project}_output)
for file in $filenames; do
awk "{ if(a) print }; /^####$file.conf$/{a=1}; /^$/{a=0};" /tmp/fastd_${project}_output | sed 's/ float;/;/g' > /etc/fastd/$project/peers/$file
echo 'float yes;' >> /etc/fastd/$project/peers/$file
done
#reload
kill -HUP $(cat /var/run/fastd.$project.pid)
else
echo "Der Router kann keine Verbindung zum Fastdserver aufbauen"
echo "$0 macht nichts!"
fi
exit 0
# vim: noexpandtab

View File

@ -1,14 +0,0 @@
#!/bin/sh
#solves MTU problem with bad ISP´s
iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
# Wenn ein router direkt am Netz hängt, ist er auch ssh Angriffen ausgesetzt.
# Das wirkt bei kleinen Geräten wir ein DOS
WAN=$(uci get network.wan.ifname)
iptables -A INPUT -i $WAN -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -i $WAN -j REJECT
# Limit ssh to 3 new connections per 60 seconds
/usr/sbin/ip6tables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name dropbear
/usr/sbin/ip6tables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 3 --rttl --name dropbear -j DROP

View File

@ -1,3 +0,0 @@
#!/bin/sh
wget -T15 http://[`uci get configurator.@api[0].ipv6_address`%`uci get configurator.@api[0].ipv6_interface`]/api_nodewatcher.php?section=get_hostnames_and_mac -O - | grep -v -e "^..-..-" | sort -u > /tmp/bat-hosts

View File

@ -1,5 +0,0 @@
#!/bin/sh
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
sleep 3
sh /etc/fastdstart.sh
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
sh /etc/configurator.sh
}

View File

@ -1,92 +0,0 @@
if ! uci get nodewatcher.@network[0].client_interfaces; then
echo "Setting nodewatchers client interfaces to: $CLIENTIF"
uci set nodewatcher.@network[0].client_interfaces="$CLIENTIF"
uci commit
fi
if ! uci get network.$SWITCHDEV.ifname; then
SWITCHHW=$(swconfig list | awk '{ print $4 }')
uci set network.$SWITCHDEV=switch
uci set network.$SWITCHDEV.name=$SWITCHHW
uci set network.$SWITCHDEV.enable=1
uci set network.$SWITCHDEV.reset=1
uci set network.$SWITCHDEV.enable_vlan=1
uci set network.${SWITCHDEV}_1=switch_vlan
uci set network.${SWITCHDEV}_1.device=$SWITCHHW
uci set network.${SWITCHDEV}_1.vlan=1
uci set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
echo "# Allow IPv6 RAs on WAN Port" >> /etc/sysctl.conf
if [[ "$WANDEV" = "$SWITCHDEV" ]]; then
uci set network.${SWITCHDEV}_2=switch_vlan
uci set network.${SWITCHDEV}_2.device=$SWITCHHW
uci set network.${SWITCHDEV}_2.vlan=2
uci set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
echo "net.ipv6.conf.$WANDEV.2.accept_ra_defrtr = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.2.accept_ra_pinfo = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.2.autoconf = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.2.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
else
echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
fi
uci set network.${SWITCHDEV}_3=switch_vlan
uci set network.${SWITCHDEV}_3.device=$SWITCHHW
uci set network.${SWITCHDEV}_3.vlan=3
uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
uci set network.mesh.ifname="$SWITCHDEV.1 bat0"
uci set network.ethmesh.ifname="$SWITCHDEV.3"
if [[ "$WANDEV" = "$SWITCHDEV" ]]; then
uci set network.wan.ifname=$WANDEV.2
else
uci set network.wan.ifname=$WANDEV
fi
uci commit
/etc/init.d/network restart
fi
if [[ -n "$ETHMESHMAC" ]]; then
if uci get network.ethmesh.macaddr
then
echo "MAC for ethmesh is set already"
else
echo "Fixing MAC on eth0.3 (ethmesh)"
sleep 10
NEW_MACADDR=$(cat /sys/class/net/$ETHMESHMAC/address)
uci set network.ethmesh.macaddr=$NEW_MACADDR
uci commit
ifconfig eth0.3 down
ifconfig eth0.3 hw ether $NEW_MACADDR
ifconfig eth0.3 up
/etc/init.d/network restart
fi
fi
if [[ -n "$ROUTERMAC" ]]; then
if uci get network.mesh.macaddr
then
echo "MAC for mesh is set already"
else
echo "Fixing MAC on br-mesh (mesh)"
sleep 10
NEW_MACADDR=$(cat /sys/class/net/$ROUTERMAC/address)
uci set network.mesh.macaddr=$NEW_MACADDR
uci commit
ifconfig br-mesh down
ifconfig br-mesh hw ether $NEW_MACADDR
ifconfig br-mesh up
/etc/init.d/network restart
fi
fi

View File

@ -1,218 +0,0 @@
#!/bin/sh
# Netmon Nodewatcher (C) 2010-2012 Freifunk Oldenburg
# License; GPL v3
SCRIPT_VERSION="30"
test -f /tmp/started || exit
#Get the configuration from the uci configuration file
#If it does not exists, then get it from a normal bash file with variables.
if [ -f /etc/config/nodewatcher ];then
SCRIPT_ERROR_LEVEL=`uci get nodewatcher.@script[0].error_level`
SCRIPT_LOGFILE=`uci get nodewatcher.@script[0].logfile`
SCRIPT_DATA_FILE=`uci get nodewatcher.@script[0].data_file`
MESH_INTERFACE=`uci get nodewatcher.@network[0].mesh_interface`
CLIENT_INTERFACES=`uci get nodewatcher.@network[0].client_interfaces`
else
. `dirname $0`/nodewatcher_config
fi
if [ $SCRIPT_ERROR_LEVEL -gt "1" ]; then
err() {
echo $1 >> $SCRIPT_LOGFILE
}
else
err() {
:
}
fi
#this method checks id the logfile has bekome too big and deletes the first X lines
delete_log() {
if [ -f $SCRIPT_LOGFILE ]; then
if [ `ls -la $SCRIPT_LOGFILE | awk '{ print $5 }'` -gt "6000" ]; then
sed -i '1,60d' $SCRIPT_LOGFILE
err "`date`: Logfile has been made smaller"
fi
fi
}
#this method generates the crawl data xml file that is beeing fetched by netmon
#and provided by a small local httpd
crawl() {
#Get system data from other locations
err "`date`: Collecting basic system status data"
hostname="$(cat /proc/sys/kernel/hostname)"
uptime=$(awk '{ printf "<uptime>"$1"</uptime><idletime>"$2"</idletime>" }' /proc/uptime)
memory=$(awk '
/^MemTotal/ { printf "<memory_total>"$2"</memory_total>" }
/^Cached:/ { printf "<memory_caching>"$2"</memory_caching>" }
/^Buffers/ { printf "<memory_buffering>"$2"</memory_buffering>" }
/^MemFree/ { printf "<memory_free>"$2"</memory_free>" }
' /proc/meminfo)
cpu=$(awk -F': ' '
/model/ { printf "<cpu>"$2"</cpu>" }
/system type/ { printf "<chipset>"$2"</chipset>" }
' /proc/cpuinfo)
local_time="`date +%s`"
load=$(awk '{ printf "<loadavg>"$3"</loadavg><processes>"$4"</processes>" }' /proc/loadavg)
err "`date`: Collecting version information"
batman_adv_version=$(cat /sys/module/batman_adv/version)
kernel_version=$(uname -r)
fastd_version=$(fastd -v | awk '{ print $2 }')
nodewatcher_version=$SCRIPT_VERSION
# example for /etc/openwrt_release:
#DISTRIB_ID="OpenWrt"
#DISTRIB_RELEASE="Attitude Adjustment"
#DISTRIB_REVISION="r35298"
#DISTRIB_CODENAME="attitude_adjustment"
#DISTRIB_TARGET="atheros/generic"
#DISTRIB_DESCRIPTION="OpenWrt Attitude Adjustment 12.09-rc1"
. /etc/openwrt_release
distname=$DISTRIB_ID
distversion=$DISTRIB_RELEASE
# example for /etc/firmware_release:
#FIRMWARE_VERSION="95f36685e7b6cbf423f02cf5c7f1e785fd4ccdae-dirty"
#RELEASE_DATE="build date: Di 29. Jan 19:33:34 CET 2013"
#FIRMWARE_REVISION="build date: Di 29. Jan 19:33:34 CET 2013"
#OPENWRT_CORE_REVISION="35298"
#OPENWRT_FEEDS_PACKAGES_REVISION="35298"
. /etc/firmware_release
SYSTEM_DATA="<status>online</status><hostname>$hostname</hostname><distname>$distname</distname><distversion>$distversion</distversion>$cpu$memory$load$uptime<local_time>$local_time</local_time><batman_advanced_version>$batman_adv_version</batman_advanced_version><kernel_version>$kernel_version</kernel_version><fastd_version>$fastd_version</fastd_version><nodewatcher_version>$nodewatcher_version</nodewatcher_version><firmware_version>$FIRMWARE_VERSION</firmware_version><firmware_revision>$FIRMWARE_REVISION</firmware_revision><openwrt_core_revision>$OPENWRT_CORE_REVISION</openwrt_core_revision><openwrt_feeds_packages_revision>$OPENWRT_FEEDS_PACKAGES_REVISION</openwrt_feeds_packages_revision>"
err "`date`: Collecting information from network interfaces"
#Get interfaces
#IFACES=`cat /proc/net/dev | awk -F: '!/\|/ { gsub(/[[:space:]]*/, "", $1); split($2, a, " "); printf("%s=%s=%s ", $1, a[1], a[9]) }'`
interface_data=""
#Loop interfaces
#for entry in $IFACES; do
for filename in `grep 'up\|unknown' /sys/class/net/*/operstate`; do
ifpath=${filename%/operstate*}
iface=${ifpath#/sys/class/net/}
if [ "$iface" = "lo" ]; then
continue
fi
#Get interface data
addrs="$(ip addr show dev ${iface} | awk '
/ether/ { printf "<mac_addr>"$2"</mac_addr>" }
/inet / { split($2, a, "/"); printf "<ipv4_addr>"a[1]"</ipv4_addr>" }
/inet6/ && /scope global/ { printf "<ipv6_addr>"$2"</ipv6_addr>" }
/inet6/ && /scope link/ { printf "<ipv6_link_local_addr>"$2"</ipv6_link_local_addr>"}
/mtu/ { printf "<mtu>"$5"</mtu>" }
')"
#mac_addr="`cat $ifpath/address`"
#ipv4_addr="`ip addr show dev ${iface} | awk '/inet / { split($2, a, "/"); print a[1] }'`"
#ipv6_addr="`ip addr show dev ${iface} scope global | awk '/inet6/ { print $2 }'`"
#ipv6_link_local_addr="`ip addr show dev ${iface} scope link | awk '/inet6/ { print $2 }'`"
#mtu=`cat $ifpath/mtu`
traffic_rx=`cat $ifpath/statistics/rx_bytes`
traffic_tx=`cat $ifpath/statistics/tx_bytes`
#interface_data=$interface_data"<$iface><name>$iface</name><mac_addr>$mac_addr</mac_addr><ipv4_addr>$ipv4_addr</ipv4_addr><ipv6_addr>$ipv6_addr</ipv6_addr><ipv6_link_local_addr>$ipv6_link_local_addr</ipv6_link_local_addr><traffic_rx>$traffic_rx</traffic_rx><traffic_tx>$traffic_tx</traffic_tx><mtu>$mtu</mtu>"
interface_data=$interface_data"<$iface><name>$iface</name>$addrs<traffic_rx>$traffic_rx</traffic_rx><traffic_tx>$traffic_tx</traffic_tx>"
interface_data=$interface_data$(iwconfig ${iface} 2>/dev/null | awk -F':' '
/Mode/{ split($2, m, " "); printf "<wlan_mode>"m[1]"</wlan_mode>" }
/Cell/{ split($0, c, " "); printf "<wlan_bssid>"c[5]"</wlan_bssid>" }
/ESSID/ { split($0, e, "\""); printf "<wlan_essid>"e[2]"</wlan_essid>" }
/Freq/{ split($3, f, " "); printf "<wlan_frequency>"f[1]f[2]"</wlan_frequency>" }
/Tx-Power/{ split($0, p, "="); sub(/[[:space:]]*$/, "", p[2]); printf "<wlan_tx_power>"p[2]"</wlan_tx_power>" }
')"</$iface>"
#if [ "`iwconfig ${iface} 2>/dev/null | grep IEEE`" != "" ]; then
# wlan_mode="`iwconfig $iface | awk -F':' '/Mode/{ split($2, m, " "); print m[1] }'`"
#
# if [ $wlan_mode = "Master" ]; then
# wlan_bssid="`iw $iface info | awk '/addr/{ print $2 }'`"
# elif [ $wlan_mode = "Ad-Hoc" ]; then
# wlan_bssid="`iwconfig $iface | awk '/Cell/{ print $5 }'`"
# fi
#
# wlan_essid="`iwconfig ${iface} | awk -F'"' '/ESSID/ { print $2 }'`"
# wlan_frequency="`iwconfig $iface | awk -F':' '/Freq/{ split($3, f, " "); print f[1] }'`"
# wlan_tx_power="`iwconfig $iface | awk -F'=' '/Tx-Power/{ print $2 }'`"
#
# interface_data=$interface_data"<wlan_mode>$wlan_mode</wlan_mode><wlan_frequency>$wlan_frequency</wlan_frequency><wlan_essid>$wlan_essid</wlan_essid><wlan_bssid>$wlan_bssid</wlan_bssid><wlan_tx_power>$wlan_tx_power</wlan_tx_power>"
#fi
#interface_data=$interface_data"</$iface>"
done
err "`date`: Collecting information from batman advanced and it´s interfaces"
#B.A.T.M.A.N. advanced
if [ -f /sys/module/batman_adv/version ]; then
for iface in $(grep active /sys/class/net/*/batman_adv/iface_status); do
status=${iface#*:}
iface=${iface%/batman_adv/iface_status:active}
iface=${iface#/sys/class/net/}
BATMAN_ADV_INTERFACES=$BATMAN_ADV_INTERFACES"<$iface><name>$iface</name><status>$status</status></$iface>"
done
batman_adv_originators=$(awk \
'BEGIN { FS=" "; i=0 }
/O/ { next }
/B/ { next }
{ sub("\\(", "", $0)
sub("\\)", "", $0)
sub("\\[", "", $0)
sub("\\]:", "", $0)
sub(" ", " ", $0)
printf "<originator_"i"><originator>"$1"</originator><link_quality>"$3"</link_quality><nexthop>"$4"</nexthop><last_seen>"$2"</last_seen><outgoing_interface>"$5"</outgoing_interface></originator_"i">"
i++
}' /sys/kernel/debug/batman_adv/bat0/originators)
batman_adv_gateway_mode=$(batctl gw)
batman_adv_gateway_list=$(awk \
'BEGIN { FS=" "; i=0 }
/Gateway/ { next }
/No gateways/ { next }
{ sub("=>", "true", $0)
sub(" ", "false", $0)
sub("\\(", "", $0)
sub("\\)", "", $0)
sub("\\[", "", $0)
sub("\\]:", "", $0)
sub(" ", " ", $0)
printf "<gateway_"i"><selected>"$1"</selected><gateway>"$2"</gateway><link_quality>"$3"</link_quality><nexthop>"$4"</nexthop><outgoing_interface>"$5"</outgoing_interface><gw_class>"$6" "$7" "$8"</gw_class></gateway_"i">"
i++
}' /sys/kernel/debug/batman_adv/bat0/gateways)
fi
err "`date`: Collecting information about conected clients"
#CLIENTS
SEDDEV=$(brctl showstp $MESH_INTERFACE | awk '/\([0-9]\)/ {
sub("\\(", "", $0)
sub("\\)", "", $0)
print "s/^ "$2"/"$1"/;"
}')
client_count=$(brctl showmacs $MESH_INTERFACE | sed -e "$SEDDEV" | egrep -c "(${CLIENT_INTERFACES// /|}).*no")
err "`date`: Putting all information into a XML-File and save it at "$SCRIPT_DATA_FILE
DATA="<?xml version='1.0' standalone='yes'?><data><system_data>$SYSTEM_DATA</system_data><interface_data>$interface_data</interface_data><batman_adv_interfaces>$BATMAN_ADV_INTERFACES</batman_adv_interfaces><batman_adv_originators>$batman_adv_originators</batman_adv_originators><batman_adv_gateway_mode>$batman_adv_gateway_mode</batman_adv_gateway_mode><batman_adv_gateway_list>$batman_adv_gateway_list</batman_adv_gateway_list><client_count>$client_count</client_count></data>"
#write data to hxml file that provides the data on httpd
echo $DATA > $SCRIPT_DATA_FILE
}
LANG=C
#Prüft ob das logfile zu groß geworden ist
err "`date`: Check logfile"
delete_log
#Erzeugt die statusdaten
err "`date`: Generate actual status data"
crawl
exit 0

View File

@ -1,3 +0,0 @@
root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:root:/root:/bin/ash
nobody:*:65534:65534:nobody:/var:/bin/false
daemon:*:65534:65534:daemon:/var:/bin/false

View File

@ -0,0 +1,29 @@
#!/bin/sh
[ -f /etc/banner ] && cat /etc/banner
export PATH=/usr/bin:/usr/sbin:/bin:/sbin
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
export HOME=${HOME:-/root}
[ -x /bin/more ] || alias more=less
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
# update uhttpd passwd on passwd-change
[ -e /etc/rc.d/S50uhttpd ] && passwd() { /bin/passwd "$@" && /etc/init.d/uhttpd restart; }
# I'm lazy, let's add some aliases
alias ..='cd ..'
alias ...='cd ../..'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
alias ip='ip --color=auto'
# and color my prompt
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

View File

@ -0,0 +1,13 @@
#!/bin/sh
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
/usr/sbin/configurenetwork
sleep 3
/usr/sbin/configurehood
touch /tmp/started
exit 0

View File

@ -1,41 +0,0 @@
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
BOARD=$(cat /var/sysinfo/board_name)
case "$BOARD" in
tl-wr1043nd)
BOARD=tl-wr1043nd-v1
;;
tl-wr741nd)
grep "Atheros AR7240 rev 2" /proc/cpuinfo && BOARD=tl-wr741nd-v2 || BOARD=tl-wr741nd-v4
;;
tl-wr741nd-v4)
grep 740 /var/sysinfo/model && BOARD=tl-wr740n-v4
;;
esac
if ! uci get board.model.name; then
uci set board.model.name=BOARD
fi
. /etc/network.$BOARD
. /etc/network.sh
# collect environment info and write to dot-script
/etc/environment.sh > /tmp/environment
# Starting NTP-Client Daemon
ntpd -p ${NTPD_IP}
. /etc/firewall.user
/etc/init.d/qos disable
/etc/init.d/qos stop
#busybox-httpd for crawldata
mkdir /tmp/crawldata
httpd -h /tmp/crawldata
touch /tmp/started
exit 0

View File

@ -1,15 +0,0 @@
#!/bin/sh
#
# SHOWMACS need br-ctl! NO BUSYBOX!
#
# Version 0.2
#
# by Tim Niemeyer (reddog@mastersword.de)
#
DEV=$1
SEDDEV=`brctl showstp $DEV | egrep '\([0-9]\)' | sed -e "s/(//;s/)//" | awk '{ print "s/^ "$2"/"$1"/;" }'`
SEDMAC=`cat /etc/bat-hosts | sed -e "s/^/s\//;s/$/\/;/;s/ /\//"`
brctl showmacs $DEV | sed -e "$SEDMAC" | sed -e "$SEDDEV"

View File

@ -1,73 +0,0 @@
kernel.panic=3
net.ipv4.conf.default.arp_ignore=1
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.all.forwarding=0
net.ipv4.conf.all.send_redirects=0
net.ipv4.tcp_ecn=0
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_keepalive_time=120
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_timestamps=0
net.ipv4.netfilter.ip_conntrack_checksum=0
net.ipv4.netfilter.ip_conntrack_max=16384
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=3600
net.ipv4.netfilter.ip_conntrack_udp_timeout=60
net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=180
net.core.netdev_max_backlog=30
net.netfilter.nf_conntrack_checksum=0
#Controls source route verification
net.ipv4.conf.default.rp_filter=1
#Do not accept source routing
net.ipv4.conf.all.accept_source_route=0
net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.default.accept_source_route=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.ip_forward=0
# net.ipv6.conf.all.forwarding=1
# disable bridge firewalling by default
net.bridge.bridge-nf-call-arptables=0
net.bridge.bridge-nf-call-ip6tables=0
net.bridge.bridge-nf-call-iptables=0
net.ipv6.conf.default.accept_dad=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.default.accept_redirects=0
net.ipv6.conf.all.accept_dad=0
net.ipv6.conf.all.accept_ra=1
net.ipv6.conf.all.accept_redirects=0
# Number of Router Solicitations to send until assuming no routers are present.
# This is host and not router
net.ipv6.conf.default.router_solicitations = 0
net.ipv6.conf.all.router_solicitations = 0
# Accept Router Preference in RA?
net.ipv6.conf.default.accept_ra_rtr_pref = 0
net.ipv6.conf.all.accept_ra_rtr_pref = 1
# Learn Prefix Information in Router Advertisement
net.ipv6.conf.default.accept_ra_pinfo = 0
net.ipv6.conf.all.accept_ra_pinfo = 1
# Setting controls whether the system will accept Hop Limit settings from a router advertisement
net.ipv6.conf.default.accept_ra_defrtr = 0
net.ipv6.conf.all.accept_ra_defrtr = 1
#router advertisements can cause the system to assign a global unicast address to an interface
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.all.autoconf = 1
#how many neighbor solicitations to send out per address?
net.ipv6.conf.default.dad_transmits = 3
net.ipv6.conf.all.dad_transmits = 3
# How many global unicast IPv6 addresses can be assigned to each interface?
net.ipv6.conf.default.max_addresses = 0
net.ipv6.conf.all.max_addresses = 0

View File

@ -1 +0,0 @@
/etc/shadow

View File

@ -1,174 +0,0 @@
#!/bin/ash
test -f /tmp/started || exit
# environment
. "/tmp/environment" || exit 1
# constants
MINUTE=60
HOUR=3600
DAY=86400
TIMEOUT_SHORT=$((4*$MINUTE))
TIMEOUT_MEDIUM=$((29*$MINUTE))
TIMEOUT_LONG=$DAY
ORIGINATOR_QUALITY_MIN=50
CLIENT_AGE_MAX=60
STATEFILE="/tmp/wlanwatchdogstate"
DEBUGFILE="/root/wlanwatchdog_debug.log.gz"
# variables
STATE=
SINCE=
# functions
debug_output() {
echo "==== DEBUG OUTPUT ===="
echo "date: $(date)"
echo "=== INTERFACES ==="
ifconfig 2>&1
echo "=== BATMAN ==="
echo "== ORIGINATORS =="
batctl o 2>&1
echo "== STATISTICS =="
batctl s 2>&1
echo "== GATEWAYS =="
batctl gwl 2>&1
echo "=== BRIDGE ==="
echo "== $BRIDGE_INTERFACE =="
brctl showmacs $BRIDGE_INTERFACE 2>&1
echo "=== CONNECTIVITY TESTS ==="
echo "== PING GATEWAY OVER MESH =="
ping -6 -c3 $(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface) 2>&1
echo "== PING HOST OVER INTERNET =="
ping -4 -c3 freifunk-ol.de 2>&1
echo "=== WLAN ==="
echo "== $WLAN_CLIENT_INTERFACE =="
iw dev $WLAN_CLIENT_INTERFACE station dump 2>&1
echo "== $WLAN_MESH_INTERFACE =="
iw dev $WLAN_MESH_INTERFACE station dump 2>&1
echo "== SCAN =="
iwlist scanning 2>&1
echo "=== WATCHDOG LOG ==="
cat "/var/log/wlanwatchdog.log"
}
get_time() {
date +%s
}
count_originators() {
local COUNT=0
if [ -n "$BATMAN_INTERFACE" ]; then
COUNT=$(tail -n +3 /sys/kernel/debug/batman_adv/$BATMAN_INTERFACE/originators 2> /dev/null | \
grep "$1" | \
grep -o "^\([0-9a-f]\{2\}:\?\)\+[[:space:]]\+[0-9.]\+s[[:space:]]\+([ 0-9]\+)" | \
cut -d\( -f2 | \
cut -d\) -f1 | \
tr -d " " | \
awk -vlimit=$ORIGINATOR_QUALITY_MIN '$1>=limit{print $1}' | \
wc -l)
fi
echo $COUNT
}
count_clients() {
local COUNT=0
local NUMBER=
if [ -n "$BRIDGE_INTERFACE" ] && [ -n "$WLAN_CLIENT_INTERFACE" ]; then
NUMBER=$(brctl showstp $BRIDGE_INTERFACE 2> /dev/null | \
grep -e "^$WLAN_CLIENT_INTERFACE " | \
cut -d" " -f2 | \
tr -d "()")
fi
if [ -n "$BRIDGE_INTERFACE" ] && [ -n "$NUMBER" ]; then
COUNT=$(brctl showmacs "^$BRIDGE_INTERFACE " 2> /dev/null | \
grep -o "^[[:space:]]*$NUMBER[[:space:]]\+\([0-9a-f]\{2\}:\?\)\+[[:space:]]\+no[[:space:]]\+[0-9]\+" | \
tr "\t" " " | \
tr -s " " | \
cut -d" " -f5 | \
awk -vlimit=$CLIENT_AGE_MAX '$1<=limit{print $1}' | \
wc -l)
fi
echo $COUNT
}
count_neighbours() {
count_originators "$WLAN_MESH_INTERFACE"
}
scan_wlan() {
#FIXME: if you can; is there an easier way to get the current frequency?
#FIXME: this should reanimate the wlan driver; do passive and active scanning the job equally well?
local FREQUENCY=$(iwlist $WLAN_MESH_INTERFACE frequency 2> /dev/null | \
grep -o "Current Frequency=[0-9.]\+ GHz" | \
grep -o "[0-9.]*" | \
tr -d ".")
[ -n "$FREQUENCY" ] && iw $WLAN_MESH_INTERFACE scan freq $FREQUENCY passive 1> /dev/null 2> /dev/null
}
fsm_load() {
if [ -f "$STATEFILE" ]; then
STATE=""
SINCE=""
. "$STATEFILE" || return 1
fi
}
fsm_save() {
echo -e "STATE=${STATE}\nSINCE=${SINCE}" > "$STATEFILE" || return 1
}
fsm_entry() {
SINCE=$(get_time)
case $STATE in
pending)
scan_wlan
;;
error)
if [ -n "$DEBUG" ] && [ $DEBUG -eq 1 ]; then
debug_output | gzip > ${DEBUGFILE}
fi
reboot
;;
esac
}
fsm_transition() {
local AGE=-1
[ -n "$SINCE" ] && AGE=$(( $(get_time) - $SINCE ))
local OLDSTATE=$STATE
case $STATE in
working)
if [ $(count_neighbours) -eq 0 ] && [ $(count_clients) -eq 0 ]; then
STATE=pending
fi
;;
pending)
if [ $AGE -ge $TIMEOUT_MEDIUM ]; then
STATE=error
elif [ $(count_originators) -eq 0 ] && [ $AGE -ge $TIMEOUT_SHORT ]; then
STATE=error
elif [ $(count_neighbours) -gt 0 ] || [ $(count_clients) -gt 0 ]; then
STATE=working
fi
;;
*)
if [ $AGE -ge $TIMEOUT_LONG ]; then
STATE=error
elif [ $(count_neighbours) -gt 0 ] || [ $(count_clients) -gt 0 ]; then
STATE=working
fi
;;
esac
if [ ! "$OLDSTATE" == "$STATE" ]; then
echo "$(date) '$OLDSTATE' -> '$STATE'"
fsm_entry
fi
}
# program
fsm_load
fsm_transition
fsm_save

6
bsp/ipq40xx-generic.bsp Normal file
View File

@ -0,0 +1,6 @@
chipset=ipq40xx
subtarget=generic
images=(
"openwrt-${chipset}-${subtarget}-avm_fritzbox-4040-squashfs-*"
)

View File

@ -0,0 +1,25 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_ipq40xx=y
CONFIG_TARGET_ipq40xx_generic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ipq40xx_generic_DEVICE_avm_fritzbox-4040=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq40xx_generic_DEVICE_avm_fritzbox-4040="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca4019-ct ath10k-firmware-qca4019"
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_DROPBEAR_CURVE25519 is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_ath10k-firmware-qca4019=m
CONFIG_PACKAGE_ath10k-firmware-qca4019-ct=m
CONFIG_PACKAGE_kmod-ath10k=m
CONFIG_PACKAGE_kmod-ath10k-ct=m
CONFIG_PACKAGE_opkg=m
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_PACKAGE_kmod-hwmon-core=y

6
bsp/ipq806x-generic.bsp Normal file
View File

@ -0,0 +1,6 @@
chipset=ipq806x
subtarget=generic
images=(
"openwrt-${chipset}-${subtarget}-tplink_c2600-squashfs-*"
)

View File

@ -0,0 +1,31 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_tplink_c2600="-ath10k-firmware-qca99x0-ct ath10k-firmware-qca99x0"
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_DROPBEAR_CURVE25519 is not set
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_opkg=m
CONFIG_PACKAGE_ath10k-firmware-qca99x0=m
CONFIG_PACKAGE_kmod-ath10k=y
CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct=m
CONFIG_PACKAGE_kmod-ath10k-ct=m
CONFIG_STRIP_KERNEL_EXPORTS=y

6
bsp/mpc85xx-p1010.bsp Normal file
View File

@ -0,0 +1,6 @@
chipset=mpc85xx
subtarget=p1010
images=(
"openwrt-${chipset}-${subtarget}-tplink_tl-wdr4900-v1-squashfs-*"
)

28
bsp/mpc85xx-p1010/.config Normal file
View File

@ -0,0 +1,28 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_mpc85xx=y
CONFIG_TARGET_mpc85xx_p1010=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_mpc85xx_p1010_DEVICE_tplink_tl-wdr4900-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_mpc85xx_p1010_DEVICE_tplink_tl-wdr4900-v1=""
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_DROPBEAR_CURVE25519 is not set
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_opkg=m
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512

6
bsp/octeon.bsp Normal file
View File

@ -0,0 +1,6 @@
chipset=octeon
subtarget=generic
images=(
"openwrt-${chipset}-ubnt_edgerouter-4-*"
)

21
bsp/octeon/.config Normal file
View File

@ -0,0 +1,21 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_octeon=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
CONFIG_TARGET_DEVICE_octeon_DEVICE_ubnt_edgerouter-4=y
CONFIG_TARGET_DEVICE_PACKAGES_octeon_DEVICE_ubnt_edgerouter-4=""
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_DROPBEAR_CURVE25519 is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_opkg=m
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512

9
bsp/ramips-mt7621.bsp Normal file
View File

@ -0,0 +1,9 @@
chipset=ramips
subtarget=mt7621
images=(
"openwrt-ramips-mt7621-netgear_r6220-squashfs-*"
"openwrt-ramips-mt7621-ubnt_edgerouter-x-squashfs-*"
"openwrt-ramips-mt7621-ubnt_edgerouter-x-sfp-squashfs-*"
"openwrt-ramips-mt7621-xiaomi_mi-router-4a-gigabit-squashfs-*"
)

34
bsp/ramips-mt7621/.config Normal file
View File

@ -0,0 +1,34 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7621=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_netgear_r6220=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_DEVICE_netgear_r6220=""
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_ubnt_edgerouter-x=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_DEVICE_ubnt_edgerouter-x=""
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_ubnt_edgerouter-x-sfp=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_DEVICE_ubnt_edgerouter-x-sfp=""
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-4a-gigabit=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_DEVICE_xiaomi_mi-router-4a-gigabit=""
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_DROPBEAR_CURVE25519 is not set
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_opkg=m
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512

7
bsp/ramips-mt76x8.bsp Normal file
View File

@ -0,0 +1,7 @@
chipset=ramips
subtarget=mt76x8
images=("openwrt-${chipset}-${subtarget}-tplink_archer-c50-v3-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_archer-c50-v4-squashfs-*"
"openwrt-${chipset}-${subtarget}-tplink_tl-wr841n-v13-squashfs-*"
"openwrt-${chipset}-${subtarget}-xiaomi_mi-router-4a-100m-squashfs-*"
)

33
bsp/ramips-mt76x8/.config Normal file
View File

@ -0,0 +1,33 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt76x8=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_archer-c50-v3=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_archer-c50-v3=""
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_archer-c50-v4=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_archer-c50-v4=""
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_tl-wr841n-v13=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_tl-wr841n-v13=""
CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_xiaomi_mi-router-4a-100m=y
CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_xiaomi_mi-router-4a-100m=""
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_DROPBEAR_CURVE25519 is not set
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_opkg=m
CONFIG_STRIP_KERNEL_EXPORTS=y

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config interface 'w2mesh'
option mtu '1528'
option proto 'batadv'
option mesh 'bat0'
config interface 'w5mesh'
option mtu '1528'
option proto 'batadv'
option mesh 'bat0'
config 'interface' 'mesh'
option 'type' 'bridge'
option 'auto' '1'
config 'interface' 'wan'
option 'ifname' 'eth0.2'
option 'proto' 'dhcp'
config 'interface' 'ethmesh'
option 'mtu' '1528'
option proto 'batadv'
option mesh 'bat0'
# vim: noexpandtab

View File

@ -1,55 +0,0 @@
config wifi-device radio0
option type mac80211
option channel ${BATMAN_CHANNEL}
option phy phy0
option hwmode 11ng
option htmode HT40+
option country DE
config wifi-iface 'w2mesh'
option device radio0
option network w2mesh
option ifname w2mesh
option mode adhoc
option bssid '${BSSID_MESH}'
option ssid '${ESSID_MESH}'
option mcast_rate 6000
option 'encryption' 'none'
option 'hidden' '1'
config wifi-iface 'w2ap'
option device radio0
option network mesh
option ifname w2ap
option mode ap
option ssid '${ESSID_AP}'
option 'encryption' 'none'
config wifi-device radio1
option type mac80211
option channel ${BATMAN_CHANNEL_5GHZ}
option phy phy1
option hwmode 11na
option htmode HT40+
option country DE
config wifi-iface 'w5mesh'
option device radio1
option network w5mesh
option ifname w5mesh
option mode adhoc
option bssid '${BSSID_MESH}'
option ssid '${ESSID_MESH}'
option mcast_rate 6000
option 'encryption' 'none'
option 'hidden' '1'
config wifi-iface 'w5ap'
option device radio1
option network mesh
option ifname w5ap
option mode ap
option ssid '${ESSID_AP}'
option 'encryption' 'none'
# vim: noexpandtab

View File

@ -1,10 +0,0 @@
WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="0t 4 5"
WAN_PORTS="0t 1"
BATMAN_PORTS="0t 2 3"
CLIENTIF="eth0.1 w2ap w5ap"
ETHMESHMAC=
ROUTERMAC=w5mesh

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config interface 'w2mesh'
option mtu '1528'
option proto 'batadv'
option mesh 'bat0'
config interface 'w5mesh'
option mtu '1528'
option proto 'batadv'
option mesh 'bat0'
config 'interface' 'mesh'
option 'type' 'bridge'
option 'auto' '1'
config 'interface' 'wan'
option 'ifname' 'eth0.2'
option 'proto' 'dhcp'
config 'interface' 'ethmesh'
option 'mtu' '1528'
option proto 'batadv'
option mesh 'bat0'
# vim: noexpandtab

View File

@ -1,55 +0,0 @@
config wifi-device radio0
option type mac80211
option channel ${BATMAN_CHANNEL_5GHZ}
option phy phy0
option hwmode 11na
option htmode HT40+
option country DE
config wifi-iface 'w5mesh'
option device radio0
option network w5mesh
option ifname w5mesh
option mode adhoc
option bssid '${BSSID_MESH}'
option ssid '${ESSID_MESH}'
option mcast_rate 6000
option 'encryption' 'none'
option 'hidden' '1'
config wifi-iface 'w5ap'
option device radio0
option network mesh
option ifname w5ap
option mode ap
option ssid '${ESSID_AP}'
option 'encryption' 'none'
config wifi-device radio1
option type mac80211
option channel ${BATMAN_CHANNEL}
option phy phy1
option hwmode 11ng
option htmode HT40+
option country DE
config wifi-iface 'w2mesh'
option device radio1
option network w2mesh
option ifname w2mesh
option mode adhoc
option bssid '${BSSID_MESH}'
option ssid '${ESSID_MESH}'
option mcast_rate 6000
option 'encryption' 'none'
option 'hidden' '1'
config wifi-iface 'w2ap'
option device radio1
option network mesh
option ifname w2ap
option mode ap
option ssid '${ESSID_AP}'
option 'encryption' 'none'
# vim: noexpandtab

View File

@ -1,10 +0,0 @@
WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="0t 4 5"
WAN_PORTS="0t 1"
BATMAN_PORTS="0t 2 3"
CLIENTIF="eth0.1 w2ap w5ap"
ETHMESHMAC=
ROUTERMAC=w5mesh

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="3 4 5t"
WAN_PORTS="0 5t"
BATMAN_PORTS="1 2 5t"
CLIENTIF="eth0.1 w2ap"
ETHMESHMAC=w2ap
ROUTERMAC=eth0

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
WANDEV=eth1
# WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="1 4 0t"
WAN_PORTS=
BATMAN_PORTS="2 3 0t"
CLIENTIF="eth0.1 w2ap"
ETHMESHMAC=eth1
ROUTERMAC=w2mesh

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
WANDEV=eth1
# WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="1 2 0t"
WAN_PORTS=
BATMAN_PORTS="3 4 0t"
CLIENTIF="eth0.1 w2ap"
ETHMESHMAC=eth1
ROUTERMAC=w2mesh

View File

@ -1,11 +0,0 @@
WANDEV=eth1
# WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="1 4 0t"
WAN_PORTS=
BATMAN_PORTS="2 3 0t"
CLIENTIF="eth0.1 w2ap"
ETHMESHMAC=eth1
ROUTERMAC=w2mesh

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
WANDEV=eth0
# WANDEV=eth0
SWITCHDEV=eth1
CLIENT_PORTS="1 4 0t"
WAN_PORTS=
BATMAN_PORTS="3 2 0t"
CLIENTIF="eth1.1 w2ap"
ETHMESHMAC=eth0
ROUTERMAC=eth1

View File

@ -1,11 +0,0 @@
WANDEV=eth1
# WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="1 2 0t"
WAN_PORTS=
BATMAN_PORTS="3 4 0t"
CLIENTIF="eth0.1 w2ap"
ETHMESHMAC=eth1
ROUTERMAC=eth0

View File

@ -1,11 +0,0 @@
WANDEV=eth1
# WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS="1 2 0t"
WAN_PORTS=
BATMAN_PORTS="3 4 0t"
CLIENTIF="eth0.1 w2ap"
ETHMESHMAC=eth1
ROUTERMAC=wlan0

View File

@ -1,195 +0,0 @@
From 3abc4d782dcbf7814646e03d73bd509181a1ccd1 Mon Sep 17 00:00:00 2001
From: Tim Niemeyer <tim.niemeyer@mastersword.de>
Date: Fri, 22 Nov 2013 18:59:26 +0100
Subject: [PATCH] batman-adv: no rebroadcast option
---
...man-adv_introduce__no_rebroadcast__option.patch | 176 ++++++++++++++++++++
1 file changed, 176 insertions(+)
create mode 100644 batman-adv/patches/0002-batman-adv_introduce__no_rebroadcast__option.patch
diff --git a/batman-adv/patches/0002-batman-adv_introduce__no_rebroadcast__option.patch b/batman-adv/patches/0002-batman-adv_introduce__no_rebroadcast__option.patch
new file mode 100644
index 0000000..57d8491
--- /dev/null
+++ b/batman-adv/patches/0002-batman-adv_introduce__no_rebroadcast__option.patch
@@ -0,0 +1,176 @@
+This patch introduces a new sysfs option named "no_rebroadcast" on
+a per hard interface basis. It allows manually enabling a split-horizon
+like behaviour for the layer 2 multicast payload frames, in that
+incoming multicast payload frames on such a hard interface are only
+being rebroadcasted on all interfaces except the incoming one instead
+of being rebroadcasted on all interfaces.
+
+Such an option should only be enabled if you are certain that these
+rebroadcasts are unnecessary. This is usually the case for instance
+for point-to-point wifi longshots or wired links.
+
+This option can especially safe a significant amount of upload overhead
+if the neighbourhood on a link is rather large, for instance in some
+transitive, symmetric VPN configurations.
+
+Using this option wrongly will break your mesh network, use this option
+wisely and at your own risk!
+
+Signed-off-by: Linus Lüssing <linus.luessing@web.de>
+---
+ hard-interface.c | 2 ++
+ send.c | 4 +++
+ sysfs-class-net-batman-adv | 10 ++++++++
+ sysfs.c | 59 ++++++++++++++++++++++++++++++++++++++++++++
+ types.h | 1 +
+ 5 files changed, 76 insertions(+)
+
+diff --git a/hard-interface.c b/hard-interface.c
+index c60d3ed..4c27f05 100644
+--- a/hard-interface.c
++++ b/hard-interface.c
+@@ -602,6 +602,8 @@ batadv_hardif_add_interface(struct net_device *net_dev)
+ /* extra reference for return */
+ atomic_set(&hard_iface->refcount, 2);
+
++ atomic_set(&hard_iface->no_rebroadcast, 0);
++
+ batadv_check_known_mac_addr(hard_iface->net_dev);
+ list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list);
+
+diff --git a/send.c b/send.c
+index c83be5e..2a0e0cc 100644
+--- a/send.c
++++ b/send.c
+@@ -496,6 +496,10 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
+ if (forw_packet->num_packets >= hard_iface->num_bcasts)
+ continue;
+
++ if (atomic_read(&hard_iface->no_rebroadcast) &&
++ forw_packet->skb->dev == hard_iface->net_dev)
++ continue;
++
+ /* send a copy of the saved skb */
+ skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC);
+ if (skb1)
+diff --git a/sysfs-class-net-batman-adv b/sysfs-class-net-batman-adv
+index bdc0070..88f6f70 100644
+--- a/sysfs-class-net-batman-adv
++++ b/sysfs-class-net-batman-adv
+@@ -13,3 +13,13 @@ Description:
+ displays the batman mesh interface this <iface>
+ currently is associated with.
+
++What: /sys/class/net/<iface>/batman-adv/no_rebroadcast
++Date: Sep 2013
++Contact: Linus Lüssing <linus.luessing@web.de>
++Description:
++ With this option set incoming multicast payload frames on
++ <iface> are not being rebroadcasted on <iface> again. This
++ option should be set on links which are known to be transitive
++ and symmetric only, for instance point-to-point wifi longshots
++ or wired links. Using this option wrongly is going to
++ break your mesh network, use at your own risk!
+diff --git a/sysfs.c b/sysfs.c
+index 096b511..5e2cd21 100644
+--- a/sysfs.c
++++ b/sysfs.c
+@@ -110,6 +110,17 @@ struct batadv_attribute batadv_attr_vlan_##_name = { \
+ .store = _store, \
+ };
+
++/* Use this, if you have customized show and store functions
++ * for hard interface attrs
++ */
++#define BATADV_ATTR_HIF(_name, _mode, _show, _store) \
++struct batadv_attribute batadv_attr_hif_##_name = { \
++ .attr = {.name = __stringify(_name), \
++ .mode = _mode }, \
++ .show = _show, \
++ .store = _store, \
++};
++
+ /* Use this, if you have customized show and store functions */
+ #define BATADV_ATTR(_name, _mode, _show, _store) \
+ struct batadv_attribute batadv_attr_##_name = { \
+@@ -215,6 +226,52 @@ ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \
+ static BATADV_ATTR_VLAN(_name, _mode, batadv_show_vlan_##_name, \
+ batadv_store_vlan_##_name)
+
++#define BATADV_ATTR_HIF_STORE_BOOL(_name, _post_func) \
++ssize_t batadv_store_hif_##_name(struct kobject *kobj, \
++ struct attribute *attr, char *buff, \
++ size_t count) \
++{ \
++ struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
++ struct batadv_hard_iface *hard_iface; \
++ size_t res; \
++ \
++ hard_iface = batadv_hardif_get_by_netdev(net_dev); \
++ if (!hard_iface) \
++ return 0; \
++ \
++ res = __batadv_store_bool_attr(buff, count, _post_func, \
++ attr, &hard_iface->_name, \
++ hard_iface->soft_iface); \
++ batadv_hardif_free_ref(hard_iface); \
++ return res; \
++}
++
++#define BATADV_ATTR_HIF_SHOW_BOOL(_name) \
++ssize_t batadv_show_hif_##_name(struct kobject *kobj, \
++ struct attribute *attr, char *buff) \
++{ \
++ struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
++ struct batadv_hard_iface *hard_iface; \
++ size_t res; \
++ \
++ hard_iface = batadv_hardif_get_by_netdev(net_dev); \
++ if (!hard_iface) \
++ return 0; \
++ \
++ res = sprintf(buff, "%s\n", \
++ atomic_read(&hard_iface->_name) == 0 ? \
++ "disabled" : "enabled"); \
++ batadv_hardif_free_ref(hard_iface); \
++ return res; \
++}
++
++/* Use this, if you are going to turn a [name] in the vlan struct on or off */
++#define BATADV_ATTR_HIF_BOOL(_name, _mode, _post_func) \
++ static BATADV_ATTR_HIF_STORE_BOOL(_name, _post_func) \
++ static BATADV_ATTR_HIF_SHOW_BOOL(_name) \
++ static BATADV_ATTR_HIF(_name, _mode, batadv_show_hif_##_name, \
++ batadv_store_hif_##_name)
++
+ static int batadv_store_bool_attr(char *buff, size_t count,
+ struct net_device *net_dev,
+ const char *attr_name, atomic_t *attr)
+@@ -750,10 +807,12 @@ static ssize_t batadv_show_iface_status(struct kobject *kobj,
+ static BATADV_ATTR(mesh_iface, S_IRUGO | S_IWUSR, batadv_show_mesh_iface,
+ batadv_store_mesh_iface);
+ static BATADV_ATTR(iface_status, S_IRUGO, batadv_show_iface_status, NULL);
++BATADV_ATTR_HIF_BOOL(no_rebroadcast, S_IRUGO | S_IWUSR, NULL);
+
+ static struct batadv_attribute *batadv_batman_attrs[] = {
+ &batadv_attr_mesh_iface,
+ &batadv_attr_iface_status,
++ &batadv_attr_hif_no_rebroadcast,
+ NULL,
+ };
+
+diff --git a/types.h b/types.h
+index f323822..b5a5824 100644
+--- a/types.h
++++ b/types.h
+@@ -76,6 +76,7 @@ struct batadv_hard_iface {
+ struct rcu_head rcu;
+ struct batadv_hard_iface_bat_iv bat_iv;
+ struct work_struct cleanup_work;
++ atomic_t no_rebroadcast;
+ };
+
+ /**
+--
+1.7.10.4
+
--
1.7.10.4

View File

@ -1,6 +0,0 @@
src-link openwrt PATH/openwrt
src-link routing PATH/routing
src-link tunneldigger PATH/tunneldigger
src-link fastd PATH/fastd
src-link libremap PATH/libremap
src-link packagesol PATH/ffol

View File

@ -0,0 +1,28 @@
From: Tim Niemeyer <tim@tn-x.org>
Date: Sat, 8 Jul 2017 10:46:59 +0200
Subject: Disable OpenWrt config migration mechanisms
This disables all OpenWrt config migration mechanisms except for
files listed in /etc/sysupgrade.conf
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 7e0a00e13b8ee4be7163936fd01a7beff0ce5c99..97f50dc83088e29fba651741fff28c70f7585b3f 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -135,14 +135,14 @@ list_static_conffiles() {
local filter=$1
find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
- /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
+ /etc/sysupgrade.conf 2>/dev/null) \
\( -type f -o -type l \) $filter 2>/dev/null
}
add_conffiles() {
local file="$1"
- ( list_static_conffiles "$find_filter"; list_changed_conffiles ) |
+ ( list_static_conffiles "$find_filter" ) |
sort -u > "$file"
return 0
}

View File

@ -0,0 +1,14 @@
From: Tim Niemeyer <tim@tn-x.org>
Date: Sat, 8 Jul 2017 10:47:28 +0200
Subject: set root password
diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow
index 4b4154f21f478cc025a350363b3e34319c6afacc..b8d180a95691ab09f9c4d759ffd97da34a022623 100644
--- a/package/base-files/files/etc/shadow
+++ b/package/base-files/files/etc/shadow
@@ -1,4 +1,4 @@
-root::0:0:99999:7:::
+root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:99999:7:::
daemon:*:0:0:99999:7:::
ftp:*:0:0:99999:7:::
network:*:0:0:99999:7:::

View File

@ -0,0 +1,17 @@
From: Tim Niemeyer <tim@tn-x.org>
Date: Sat, 8 Jul 2017 10:47:56 +0200
Subject: ntpd host as string
diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd
index 074f14b8f8..a05d1789ff 100755
--- a/package/utils/busybox/files/sysntpd
+++ b/package/utils/busybox/files/sysntpd
@@ -34,7 +34,7 @@ validate_ntp_section() {
'enable_server:bool:0' \
'enabled:bool:1' \
'interface:string' \
- 'server:list(host)' \
+ 'server:list(string)' \
'use_dhcp:bool:1'
}

View File

@ -0,0 +1,29 @@
From: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Date: Wed, 10 Feb 2021 19:12:59 +0100
Subject: build: remove libustream and certs from default packages
This effectively reverts upstream commit e79df3516d3e ("build: add
libustream and certs to default pkgs").
The libustream-wolfssl library conflicts with the libustream-mbedtls
we are selecting in fff-web-ui and is probably much bigger.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
diff --git a/include/target.mk b/include/target.mk
index 7526224972e18148fec8a12318ca7f90a382475f..338e97f836759fc454986210e5818ad390ba6efb 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -12,12 +12,10 @@ DEVICE_TYPE?=router
# Default packages - the really basic set
DEFAULT_PACKAGES:=\
base-files \
- ca-bundle \
dropbear \
fstools \
libc \
libgcc \
- libustream-wolfssl \
logd \
mtd \
netifd \

View File

@ -0,0 +1,25 @@
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
Date: Mon, 19 Jul 2021 21:54:29 +0200
Subject: [PATCH] ramips: add missing label-mac-device for Xiaomi Mi Router 4A
(100M)
As both the Mi Router 4A (100M) and the Mi Router 4C use the same
label-mac-device, the alias can be moved to the shared dtsi.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
---
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
index 0f5897f5c593..d3f5e33be732 100644
--- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
@@ -11,6 +11,7 @@
led-failsafe = &led_power_yellow;
led-running = &led_power_blue;
led-upgrade = &led_power_yellow;
+ label-mac-device = &ethernet;
};
chosen {

View File

@ -0,0 +1,132 @@
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
Date: Sat, 7 Aug 2021 00:40:34 +0200
Subject: [PATCH] Disable ipq40xx lan/wan separation
While the ipq40xx only has a single MDIO connection to the switch chip,
the ipq40xx essedma ethernet driver configures two gmac interfaces,
which are seperated into WAN and LAN ports using vlan cid at driver
level. Linux is not aware of these vlan tags.
However, this configuration does interfere with the vlan ids we use in
our firmware. Therefore, this feature is disabled by setting the default
vlan id for all gmacs to 0, changing the port mask so all physical ports
are connected to the first gmac, and reducing the amount of configured
gmacs to one. The definition of the second gmac is kept, because it is
referenced by some devices. The default configuration of the switch chip
is removed accordingly.
These changes are currently only done with the FritzBox 4040 in mind.
---
.../linux/ipq40xx/base-files/etc/board.d/01_leds | 2 +-
.../ipq40xx/base-files/etc/board.d/02_network | 3 +--
.../drivers/net/ethernet/qualcomm/essedma/edma.h | 16 ++++++++--------
.../linux/ipq40xx/files/drivers/net/phy/ar40xx.c | 2 ++
...1-dts-ipq4019-add-ethernet-essedma-node.patch | 6 +++---
5 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
index ac11655904..147e159ea1 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
@@ -19,7 +19,7 @@ asus,rt-ac58u)
;;
avm,fritzbox-4040)
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" "phy1tpt"
- ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
+ ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20"
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e"
;;
avm,fritzbox-7530 |\
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 1d4c78833a..ea2cc60186 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -59,9 +59,8 @@ ipq40xx_setup_interfaces()
linksys,ea6350v3|\
linksys,ea8300|\
linksys,mr8300)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
- "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
+ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
avm,fritzbox-7530)
ucidef_add_switch "switch0" \
diff --git a/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h b/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h
index 015e5f5026..daa60639d1 100644
--- a/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h
+++ b/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h
@@ -57,14 +57,14 @@
#define EDMA_LAN 1
/* VLAN tag */
-#define EDMA_LAN_DEFAULT_VLAN 1
-#define EDMA_WAN_DEFAULT_VLAN 2
-
-#define EDMA_DEFAULT_GROUP1_VLAN 1
-#define EDMA_DEFAULT_GROUP2_VLAN 2
-#define EDMA_DEFAULT_GROUP3_VLAN 3
-#define EDMA_DEFAULT_GROUP4_VLAN 4
-#define EDMA_DEFAULT_GROUP5_VLAN 5
+#define EDMA_LAN_DEFAULT_VLAN 0
+#define EDMA_WAN_DEFAULT_VLAN 0
+
+#define EDMA_DEFAULT_GROUP1_VLAN 0
+#define EDMA_DEFAULT_GROUP2_VLAN 0
+#define EDMA_DEFAULT_GROUP3_VLAN 0
+#define EDMA_DEFAULT_GROUP4_VLAN 0
+#define EDMA_DEFAULT_GROUP5_VLAN 0
/* Queues exposed to linux kernel */
#define EDMA_NETDEV_TX_QUEUE 4
diff --git a/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c b/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
index c35ba2799f..0517e4f29e 100644
--- a/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
+++ b/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
@@ -1481,6 +1481,7 @@ ar40xx_vlan_init(struct ar40xx_priv *priv)
unsigned long bmp;
/* By default Enable VLAN */
+ /*
priv->vlan = 1;
priv->vlan_table[AR40XX_LAN_VLAN] = priv->cpu_bmp | priv->lan_bmp;
priv->vlan_table[AR40XX_WAN_VLAN] = priv->cpu_bmp | priv->wan_bmp;
@@ -1492,6 +1493,7 @@ ar40xx_vlan_init(struct ar40xx_priv *priv)
bmp = priv->wan_bmp;
for_each_set_bit(port, &bmp, AR40XX_NUM_PORTS)
priv->pvid[port] = AR40XX_WAN_VLAN;
+ */
return 0;
}
diff --git a/target/linux/ipq40xx/patches-5.4/711-dts-ipq4019-add-ethernet-essedma-node.patch b/target/linux/ipq40xx/patches-5.4/711-dts-ipq4019-add-ethernet-essedma-node.patch
index 7b2ddfe00d..1a01b08e41 100644
--- a/target/linux/ipq40xx/patches-5.4/711-dts-ipq4019-add-ethernet-essedma-node.patch
+++ b/target/linux/ipq40xx/patches-5.4/711-dts-ipq4019-add-ethernet-essedma-node.patch
@@ -36,7 +36,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
+ qcom,rx_head_buf_size = <1540>;
+ qcom,mdio_supported;
+ qcom,poll_required = <1>;
-+ qcom,num_gmac = <2>;
++ qcom,num_gmac = <1>;
+ interrupts = <0 65 IRQ_TYPE_EDGE_RISING
+ 0 66 IRQ_TYPE_EDGE_RISING
+ 0 67 IRQ_TYPE_EDGE_RISING
@@ -74,7 +74,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
+
+ gmac0: gmac0 {
+ local-mac-address = [00 00 00 00 00 00];
-+ vlan_tag = <1 0x1f>;
++ vlan_tag = <0 0x3f>;
+ };
+
+ gmac1: gmac1 {
@@ -83,7 +83,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
+ qcom,poll_required = <1>;
+ qcom,forced_speed = <1000>;
+ qcom,forced_duplex = <1>;
-+ vlan_tag = <2 0x20>;
++ vlan_tag = <0 0x00>;
+ };
+ };
+

View File

@ -0,0 +1,32 @@
From f53b71d2907eeb0d80e79d99fa7b756b5e5bf32b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
Date: Thu, 24 Feb 2022 00:04:47 +0100
Subject: [PATCH] Add hack which fixes forwarding on a stacked bridge
configuration using DSA
---
.../hack-5.4/999-fix-stacked-bridge-forwarding.patch | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
diff --git a/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch b/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
new file mode 100644
index 0000000000..e1d4cb9cd5
--- /dev/null
+++ b/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
@@ -0,0 +1,12 @@
+--- a/net/bridge/br_input.c
++++ b/net/bridge/br_input.c
+@@ -52,6 +52,9 @@ static int br_pass_frame_up(struct sk_bu
+ return NET_RX_DROP;
+ }
+
++ /* remove offload flag, so upper bridges do not drop the packet */
++ br_switchdev_frame_unmark(skb);
++
+ indev = skb->dev;
+ skb->dev = brdev;
+ skb = br_handle_vlan(br, NULL, vg, skb);
--
2.35.1

View File

@ -1,13 +0,0 @@
Index: package/base-files/files/sbin/sysupgrade
===================================================================
--- package/base-files/files/sbin/sysupgrade
+++ package/base-files/files/sbin/sysupgrade
@@ -101,7 +101,7 @@
add_uci_conffiles() {
local file="$1"
( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
- /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
+ /etc/sysupgrade.conf 2>/dev/null) \
-type f 2>/dev/null;
opkg list-changed-conffiles ) | sort -u > "$file"
return 0

View File

@ -1,390 +1,523 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
set -e
set -o pipefail
builddir=./build
OPENWRTREV=42096
OPENWRTURL=svn://svn.openwrt.org/openwrt/branches/barrier_breaker
PACKAGEREV=${OPENWRTREV}
PACKAGEURL=svn://svn.openwrt.org/openwrt/packages
# OpenWrt: package hashes correspond to core repo version
OPENWRTREV="v21.02.2"
PACKAGEREV="b0ccc356900f6e1e1dc613d0ea980d5572f553dd"
ROUTINGREV="10d3ffd8b30186b49538167bac1fa1bf9c88f860"
# Gluon packages: master from 2020-02-04
GLUONREV="12e41d0ff07ec54bbd67a31ab50d12ca04f2238c"
OPENWRT_PKGS="gpioctl-sysfs libugpio fastd haserl micrond mtr bmon"
ROUTING_PKGS="kmod-batman-adv batctl alfred babeld"
GLUON_PKGS="simple-tc uradvd"
FFF_VARIANTS="node layer3"
OPENWRTURL="https://git.freifunk-franken.de/mirror/openwrt.git"
## Feed definition [0]: name aka directory, [1]: url, [2]: revision
#official openwrt packages
OPENWRT=(openwrt
https://git.freifunk-franken.de/mirror/openwrt-packages.git
$PACKAGEREV)
#gluon packages
GLUON=(gluon
https://github.com/freifunk-gluon/packages.git
$GLUONREV)
#official openwrt routing packages
ROUTING=(routing
https://git.freifunk-franken.de/mirror/openwrt-routing.git
$ROUTINGREV)
FFF=(fff)
FFF_PKGS="-a"
FEEDS=(OPENWRT ROUTING GLUON FFF)
# Disable dnsmasq and other useless stuff
export DEVICE_TYPE=
checkout_git(){
local DIRECTORY=$1
local REPO_URL=$2
local COMMITID=$3
local MYGIT="git -C $DIRECTORY"
echo "checking out $REPO_URL to $DIRECTORY in version $COMMITID"
if [ -d "$DIRECTORY" ]; then
if $MYGIT remote -v | grep -q "$REPO_URL" ; then
echo "Right remote detected"
# Remove untracked files
$MYGIT clean -f -d
# Select desired commit and remove local changes (-f)
if ! $MYGIT checkout -f "$COMMITID" ; then
echo "commitid not found trying to fetch new commits"
$MYGIT fetch --all && $MYGIT checkout "$COMMITID"
fi
else
echo "wrong remote or not an git repo at all -> deleting whole directory"
/bin/rm -rf "$DIRECTORY"
#needs to be without -C!!!
git clone "$REPO_URL" "$DIRECTORY"
$MYGIT checkout "$COMMITID"
fi
else
echo "We need to do a fresh checkout"
#needs to be without -C!!!
git clone "$REPO_URL" "$DIRECTORY"
$MYGIT checkout "$COMMITID"
fi
}
get_source() {
cd src
#Get the OpenWrt main repo
checkout_git $builddir $OPENWRTURL $OPENWRTREV
#Get the OpenWrt Core Source for Firmware
if [ -d openwrt ]; then
url=$(svn info openwrt | awk '/^URL/ { print $2 }')
if [ "$url" = "$OPENWRTURL" ]; then
rev=$(svn info openwrt | awk '/^Revision:/ { print $2 }')
if [ "$rev" -ne "$OPENWRTREV" ]; then
svn update -r $OPENWRTREV openwrt
fi
else
/bin/rm -rf openwrt
svn checkout -r $OPENWRTREV $OPENWRTURL openwrt
fi
else
svn checkout -r $OPENWRTREV $OPENWRTURL openwrt
fi
test -d src/packages || mkdir -p src/packages
cd src/packages
test -d packages || mkdir packages
cd packages
#checkout needed package feeds
for FEEDVAR in "${FEEDS[@]}" ; do
FEED="${FEEDVAR}[@]"
FEED=("${!FEED}")
if [ -d openwrt ]; then
url=$(svn info openwrt | awk '/^URL/ { print $2 }')
if [ "$url" = "$PACKAGEURL" ]; then
rev=$(svn info openwrt | awk '/^Revision:/ { print $2 }')
if [ "$rev" -ne "$PACKAGEREV" ]; then
svn update -r $PACKAGEREV openwrt
fi
else
/bin/rm -rf openwrt
svn checkout -r $PACKAGEREV $PACKAGEURL openwrt
fi
else
svn checkout -r $PACKAGEREV $PACKAGEURL openwrt
fi
local NAME=${FEED[0]}
local URL=${FEED[1]}
local REV=${FEED[2]}
test -d routing || git clone https://github.com/openwrt-routing/packages.git routing
cd routing
git checkout 44318d05898069300ce2ad6eb05eb40f232e7123
git am --whitespace=nowarn ../../../build_patches/0001-batman-adv-no-rebroadcast-option.patch
cd ..
if [ -n "$URL" ] && [ -n "$REV" ]; then
checkout_git "$NAME" "$URL" "$REV"
test -d fastd || git clone git://git.metameute.de/lff/pkg_fastd fastd
git --git-dir=fastd/.git --work-tree=fastd/ checkout v14-1
# Patches for feeds are stored in known directories like feed_patches/$NAME/
for PATCH in $(ls ../../feed_patches/${NAME}/*.patch 2>/dev/null); do
if [ -s "$PATCH" ] ; then
echo "Applying $PATCH"
git -C "$NAME" am --whitespace=nowarn "../$PATCH"
else
echo "Empty patch $PATCH ignored."
fi
done
fi
done
if [ ! -d tunneldigger ]; then
git init tunneldigger
cd tunneldigger/
git remote add -f origin https://github.com/wlanslovenija/firmware-packages-opkg.git
git config core.sparsecheckout true
echo net/tunneldigger/ >> .git/info/sparse-checkout
git pull origin
cd ..
fi
git --git-dir=tunneldigger/.git --work-tree=tunneldigger checkout 8c750d28506c08abbcce9edc5761332074b43116
cd .. # packages
cd .. # src
}
test -d libremap || git clone https://github.com/libremap/libremap-agent-openwrt.git libremap
git --git-dir=libremap/.git --work-tree=libremap checkout 7194289d4b8a009df10613a3a88dc841fa26f423
cd .. # packages
cd .. # src
patch_target() {
for patch in $(ls "$PWD"/build_patches/openwrt/*.patch 2>/dev/null); do
echo "Applying $patch:"
patch --no-backup-if-mismatch -p1 -d "$builddir" -i "$patch"
done
}
prepare() {
get_source
get_source
test -d $builddir || mkdir $builddir
patch_target
/bin/rm -rf $target
svn export src/openwrt $target
# apply variant to ensure the included file "variant.mk"
# exists in builddir.
apply_variant
#apply own feeds.conf
sed -e"s|PATH|$(pwd)/src/packages|g" ./build_patches/feeds.conf > $target/feeds.conf
update_feeds
}
test -d $target/feeds && /bin/rm -rf $target/feeds
apply_variant() {
# set the variant for this build
export FFF_VARIANT=$(cat selected_variant)
# force the reevaluation of this Makefile to make note of the new variant
touch ./src/packages/fff/fff/Makefile
}
$target/scripts/feeds update
$target/scripts/feeds install -p packagesol nodewatcher
$target/scripts/feeds install -p fastd fastd libuecc
$target/scripts/feeds install -p tunneldigger tunneldigger
$target/scripts/feeds install -p libremap libremap-agent
$target/scripts/feeds install -p routing alfred kmod-batman-adv kmod-batgat
$target/scripts/feeds install -p openwrt bridge ethtool gpioctl-sysfs horst libugpio mii-tool wavemon kmod-gpiotoggling
update_feeds() {
## generate own feeds.conf
#this local variable should be globally configure variable used in get_source and here
local PACKAGEBASE=${PWD}/src/packages
rm -f "$builddir"/feeds.conf
for FEEDVAR in "${FEEDS[@]}" ; do
FEED="${FEEDVAR}[@]"
FEED=("${!FEED}")
local NAME=${FEED[0]}
echo "adding $NAME to package feeds"
echo src-link "$NAME" "$PACKAGEBASE"/"$NAME" >> "$builddir"/feeds.conf
done
# todo evaluate this with the new openwrt
# This changes the default behavior of sysupgrade to not save the config
cat build_patches/sysupgrade_no_config_save.patch | patch -p0 -d $target
echo "cleaning feeds"
"$builddir"/scripts/feeds clean
#saves ~200MB for each build
test -d ./src/dl || mkdir ./src/dl
ln -s ../../src/dl $target/dl
"$builddir"/scripts/feeds update
board_prepare
for FEEDVAR in "${FEEDS[@]}" ; do
FEED="${FEEDVAR}[@]"
FEED=("${!FEED}")
local NAME=${FEED[0]}
local PACKAGESVAR="${FEEDVAR}_PKGS"
PACKAGESVAR="${PACKAGESVAR}[@]"
PACKAGESVAR=(${!PACKAGESVAR})
if [[ -n "${PACKAGESVAR[@]}" ]] ; then
echo "adding ${PACKAGESVAR[*]} from feed $NAME to available packages"
"$builddir"/scripts/feeds install -p "$NAME" "${PACKAGESVAR[@]}"
fi
done
}
prebuild() {
#create filesdir for our config
/bin/rm -rf $target/files
mkdir $target/files
apply_variant
cp -r ./bsp/default/root_file_system/* $target/files/
cp -r ./bsp/$machine/root_file_system/* $target/files/
cp ./bsp/$machine/.config $target/.config
#create filesdir for our config
/bin/rm -rf "$builddir"/files
mkdir "$builddir"/files
arch=$(awk -F= '/^CONFIG_TARGET_BOARD/{print gsub(/"/,"",$2); print $2;}' ./bsp/$machine/.config)
version=$(awk '/^CONFIG_LINUX/ { sub(/CONFIG_LINUX_/,""); sub(/=y/,""); gsub(/_/,"."); print; }' ./bsp/$machine/.config)
test -f ./bsp/$machine/.kernelconfig-$version && \
cp ./bsp/$machine/.kernelconfig-$version \
$target/target/linux/$arch/config-$version
cp -r ./bsp/default/root_file_system/* "$builddir"/files/
cp ./bsp/"$machine"/.config "$builddir"/.config
board_prebuild
#insert actual firware version informations into release file
variant=$(cat selected_variant)
version=$(git describe --tags --dirty)
if [ 0 -ne $? ]; then
version=$(git log -1 --pretty=format:%h)
fi
if [ -n "$variant" ]; then
version="$variant-$version"
fi
for template in $(find $target/files -name *.tpl)
do
echo "Translating $template .."
$tpl_translate $template > $(dirname $template)/$(basename $template .tpl)
/bin/rm $template
done
{
echo "FIRMWARE_VERSION=\"$version\""
echo "VARIANT=\"$variant\""
echo "BUILD_DATE=\"build date: $(date)\""
echo "OPENWRT_CORE_REVISION=\"${OPENWRTREV}\""
echo "OPENWRT_FEEDS_PACKAGES_REVISION=\"${PACKAGEREV}\""
} > "$builddir"/files/etc/firmware_release
#insert actual firware version informations into release file
version=$(git describe --tags --dirty)
echo "FIRMWARE_VERSION=\"$version\"" > $target/files/etc/firmware_release
echo "RELEASE_DATE=\"build date: "`date`"\"" >> $target/files/etc/firmware_release
echo "FIRMWARE_REVISION=\"build date: "`date`"\"" >> $target/files/etc/firmware_release
echo "OPENWRT_CORE_REVISION=\""${OPENWRTREV}"\"" >> $target/files/etc/firmware_release
echo "OPENWRT_FEEDS_PACKAGES_REVISION=\""${PACKAGEREV}"\"" >> $target/files/etc/firmware_release
opath=$(pwd)
cd "$builddir"
make defconfig
cd "$opath"
}
build() {
prebuild
prebuild
opath=$(pwd)
cd $target
cpus=$(grep processor /proc/cpuinfo | wc -l)
rm_firmware
case "$1" in
"debug")
make V=99
;;
"fast")
ionice -c 2 -- nice -n 1 -- make -j$[$cpus*2]
;;
*)
ionice -c 3 -- nice -n 10 -- make -j$[$cpus+1]
;;
esac
opath=$(pwd)
cd "$builddir"
cpus=$(nproc)
cd $opath
case "$1" in
"debug")
make V=99
;;
"fast")
ionice -c 2 -- nice -n 1 -- make -j $((cpus*2))
;;
*)
ionice -c 3 -- nice -n 10 -- make -j $((cpus+1))
;;
esac
if [ ! -d bin ]; then
mkdir bin
fi
postbuild
cd "$opath"
cp_firmware
}
config() {
prebuild
prebuild
opath=$(pwd)
cd $target
opath=$(pwd)
cd "$builddir"
case "$1" in
"openwrt")
make menuconfig
;;
"kernel")
make kernel_menuconfig
;;
esac
case "$1" in
"openwrt")
make menuconfig
;;
esac
cd $opath
save=""
until [ "$save" = "y" -o "$save" = "n" ]; do
echo "Do you want to save the generated config? (y/n)"
read save
done
save=""
until [ "$save" = "y" -o "$save" = "n" ]; do
echo "Do you want to save the generated config? (y/n)"
read save
done
if [ "$save" = "y" ]; then
case "$1" in
"openwrt")
grep '^CON\|^# CON' $target/.config | sort > ./bsp/$machine/.config
;;
"kernel")
arch=$(awk -F= '/^CONFIG_TARGET_BOARD/{gsub(/"/,"",$2); print $2;}' ./bsp/$machine/.config)
version=$(awk '/^CONFIG_LINUX/ { sub(/CONFIG_LINUX_/,""); sub(/=y/,""); gsub(/_/,"."); print; }' ./bsp/$machine/.config)
grep '^CON\|^# CON' $target/target/linux/$arch/config-$version | sort > ./bsp/$machine/.kernelconfig-$version
;;
esac
fi
if [ "$save" = "y" ]; then
case "$1" in
"openwrt")
echo "# Generated using \"./buildscript config openwrt\"." > "$opath"/bsp/"$machine"/.config
echo "# Do no edit manually" >> "$opath"/bsp/"$machine"/.config
echo "#" >> "$opath"/bsp/"$machine"/.config
./scripts/diffconfig.sh >> "$opath"/bsp/"$machine"/.config
;;
esac
fi
cd "$opath"
}
postbuild() {
board_postbuild
rm_firmware() {
[ -n "$subtarget" ] || subtarget="generic"
rm -rf $builddir/bin/targets/${chipset}/${subtarget}
}
flash() {
# some flash tools need an arguement..
board_flash $1
cp_firmware() {
[ -n "$subtarget" ] || subtarget="generic"
mkdir -p "bin/$variant"
imagesrcpath="$builddir/bin/targets/${chipset}/${subtarget}"
imagedestpath="./bin/$variant"
for image in ${images[@]}; do
# This assumes the set of images names is given with a wildcard
fullsrcpattern=$imagesrcpath/$image
if ! ls $fullsrcpattern >/dev/null 2>/dev/null; then
echo "Warning: $image not found."
continue
fi
for f in $fullsrcpattern; do
filename_build=${f##*/}
filename_build=${filename_build//openwrt/fff-${version}}
filename_build=${filename_build//squashfs-/}
filename_build=${filename_build//${chipset}-/}
filename_build=${filename_build//${subtarget}-/}
cp "$f" "$imagedestpath/$filename_build"
done
done
}
buildrelease() {
if [ "$1" = "all" ];then
all=true
elif [ "$1" = "fast" ];then
fast=fast
fi
if [ "$2" = "all" ];then
all=true
elif [ "$2" = "fast" ];then
fast=fast
fi
if [ $all ]; then
buildall $fast
else
build $fast
fi
cd bin/$variant
for binary in *.bin *.img *.tar; do
md5sum "$binary" > ./"$binary".md5
sha256sum "$binary" > ./"$binary".sha256
done
echo -e "VERSION:$version" > release.nfo
cd ../..
}
clean() {
board_clean
/bin/rm -rf bin $builddir
/bin/rm -rf bin $builddir
# remove downloaded package feeds
for FEEDVAR in "${FEEDS[@]}" ; do
FEED="${FEEDVAR}[@]"
FEED=("${!FEED}")
local NAME=${FEED[0]}
local URL=${FEED[1]}
local REV=${FEED[2]}
if [ -n "$URL" ] && [ -n "$REV" ]; then
/bin/rm -rf src/packages/"$NAME"
fi
done
}
loadBSP()
{
localbsppath=$(/bin/ls -l selected_bsp | awk '{ print $11 }')
if ! [ -s selected_bsp ]; then
echo "Error: $localbsppath does not exist. Aborting ..."
exit 1
fi
echo "Working with $localbsppath"
. selected_bsp
machine=$(basename $(realpath selected_bsp) .bsp)
}
loadVariant()
{
echo "Working with build variant \"$(cat selected_variant)\""
}
setVariant()
{
echo "$1" > selected_variant
}
setBSP()
{
/bin/rm -rf selected_bsp
/bin/ln -s "$1" selected_bsp
loadBSP
}
buildall() {
for bsp in $(/bin/ls bsp/*.bsp)
do
./buildscript selectcommunity $1
./buildscript selectbsp $bsp
./buildscript prepare
./buildscript build $2
done
for bsp in $(/bin/ls bsp/*.bsp); do
setBSP "$bsp"
build "$1"
done
}
routers() {
echo "router-types: "
echo " dir300"
echo " dir300b_adhoc"
echo " dir300b_ap"
echo " fonera"
echo " wrt54g_ap"
echo " wrt54g_adhoc"
echo " wr741nd"
echo " wr1043nd"
}
if [ "$(/usr/bin/id -u)" -eq 0 ]; then
echo "don't run buildscript as root"
exit 1
fi
if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" -a "$1" != "buildall" ]; then
if [ ! -h selected_bsp ]; then
echo "Please select a Board-Support-Package using:"
echo "$0 selectbsp"
exit
if [ "$1" != "selectbsp" -a "$1" != "selectvariant" ]; then
if [ ! -h selected_bsp ]; then
echo "Please select a Board-Support-Package using:"
echo "$0 selectbsp"
exit
fi
if [ ! -h selected_community ]; then
echo "Please select a community file using:"
echo "$0 selectcommunity"
exit
if [ ! -f selected_variant ]; then
echo "Please select a build variant using:"
echo "$0 selectvariant"
exit
fi
echo "Working with $(/bin/ls -l selected_bsp | awk '{ print $11 }') and" \
"$(/bin/ls -l selected_community | awk '{ print $11 }')"
. selected_bsp
tpl_translate=$(awk -F= 'BEGIN{printf("sed")} /^.+$/{gsub("/", "\\/", $0); printf(" -es/\\${%s}/%s/g",$1,$2)}' selected_community)
loadBSP
loadVariant
echo
fi
case "$1" in
"selectbsp")
if [ "$2" = "help" ] || [ "$2" = "" ]; then
echo "Select a Board-Support-Package:"
echo
echo "Usage: $0 $1 bsp"
echo "bsp: "
/bin/ls bsp/*.bsp
else
if [ ! -f $2 ]; then
"selectbsp")
if [ "$2" = "help" ] || [ "$2" = "" ]; then
echo "Select a Board-Support-Package:"
echo
echo "Usage: $0 $1 <bsp-file>"
echo "available packages:"
/bin/ls bsp/*.bsp
echo
else
if [ ! -f "$2" ]; then
echo "Could not find $2"
else
/bin/rm -rf selected_bsp
/bin/ln -s $2 selected_bsp
setBSP "$2"
fi
fi
;;
"selectcommunity")
if [ "$2" = "help" ] || [ "$2" = "" ]; then
echo "Select a Community-File:"
echo
echo "Usage: $0 $1 community.cfg"
echo "community.cfg: "
/bin/ls community/*.cfg
else
if [ ! -f $2 ]; then
echo "Could not find $2"
fi
;;
"selectvariant")
if [ "$2" = "help" ] || [ "$2" = "" ]; then
echo "Select a build variant:"
echo
echo "Usage: $0 $1 <name of variant>"
echo "available variants: $FFF_VARIANTS"
echo
else
if ! echo "$FFF_VARIANTS" | grep -q "\b$2\b"; then
echo "Could not find variant $2"
else
/bin/rm -rf selected_community
/bin/ln -s $2 selected_community
setVariant $2
fi
fi
;;
"prepare")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option fetches the sources for the images and configurates the build so that it can be compiled"
echo "Usage: $0 $1"
else
prepare
fi
;;
"build")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option compiles the firmware"
echo "Normaly the build uses lower IO and System priorities, "
echo "you can append \"fast\" option, to use normal user priorities"
echo "Usage: $0 $1 [fast|debug]"
else
build "$2"
fi
;;
"config")
case "$2" in
openwrt)
config openwrt
;;
kernel)
config kernel
;;
*)
echo "This open the OpenWRT menuconfig dialog"
echo
echo "Usage: $0 $1 openwrt|kernel"
;;
esac
;;
"download")
if [ "$2" = "help" ] || [ "$2" = "" ]; then
echo "This option downloads the ready configured images from an external location if needet."
echo "Usage: $0 $1 http://downloadfolder router-type"
echo "Common downloadfolder for firmware version 0.3 is http://dev.freifunk-ol.de/firmware/0.3/"
routers
echo
echo
echo "This function is broken!"
else
exit
mkdir ./bin
cd ./bin
wget "$2/$3/openwrt-$3-root.squashfs"
wget "$2/$3/openwrt-$3-vmlinux.lzma"
cd ..
fi
;;
"flash")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option flashes the router."
echo "$0 $1 net-dev"
routers
echo "net-dev:"
echo " ethX"
else
flash "$2"
fi
;;
"clean")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option cleans all build files."
echo "$0 $1 all"
else
clean
fi
;;
"buildall")
if [ "$2" = "help" ] || [ "$2" = "" ]; then
echo "This option builds the firmware for all routers of a given community."
echo "Usage: $0 $1 community.cfg [fast]"
echo "community.cfg: "
/bin/ls community/*.cfg
else
buildall $2 $3
fi
;;
*)
echo "This is the Build Environment Script of the Freifunk Community Oldenburg."
echo "Usage: $0 command"
echo "command:"
echo " selectcommunity [communityfile]"
echo " selectbsp [bsp file]"
echo " prepare"
echo " config"
echo " build"
echo " buildall"
echo " flash"
echo " download"
echo ""
echo "If you need help to one of these options just type $0 command help"
;;
fi
;;
"prepare")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option fetches the sources for the images and configurates the build so that it can be compiled"
echo
echo "Usage: $0 $1"
echo
else
prepare
fi
;;
"updatefeeds")
update_feeds
;;
"build")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option compiles the firmware"
echo "Normaly the build uses lower IO and System priorities, "
echo "you can append \"fast\" option, to use normal user priorities"
echo
echo "Usage: $0 $1 [fast|debug]"
echo
else
build "$2"
fi
;;
"config")
case "$2" in
openwrt)
config openwrt
;;
*)
echo "This open the OpenWrt menuconfig dialog"
echo
echo "Usage: $0 $1 openwrt"
echo
;;
esac
;;
"clean")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option cleans all build files."
echo
echo "Usage: $0 $1"
echo
else
clean
fi
;;
"buildall")
if [ "$2" = "help" ]; then
echo "This option builds the firmware for all routers."
echo
echo "Usage: $0 $1 [fast]"
echo
else
buildall "$2"
fi
;;
"release")
if [ "$2" = help ]; then
echo "This option builds the firmware for a given board. It also creates hash sums and a the file release.nfo"
echo
echo "Usage: $0 $1 [all] [fast]"
echo
else
buildrelease "$2" "$3"
fi
;;
*)
echo "This is the Build Environment Script of the Freifunk Community Franken."
echo
echo "Usage: $0 command"
echo "command:"
echo " selectbsp <bsp-file>"
echo " selectvariant <name of variant>"
echo " prepare"
echo " updatefeeds"
echo " config openwrt"
echo " build [fast|debug]"
echo " buildall [fast]"
echo " release [all] [fast]"
echo " clean"
echo ""
echo "If you need help to one of these options just type: $0 <command> help"
echo
;;
esac
# vim: noexpandtab

View File

@ -1,9 +0,0 @@
BATMAN_CHANNEL=1
BATMAN_CHANNEL_5GHZ=36
ESSID_AP=franken.freifunk.net
ESSID_MESH=batman.franken.freifunk.net
BSSID_MESH=02:CA:FF:EE:BA:BE
NETMON_IP=fe80::ff:feee:1
VPN_PROJECT=fff
NTPD_IP=fe80::ff:feee:1%br-mesh
UPGRADE_PATH=http://[fe80::ff:feee:1%br-mesh]/dev/firmware/current/

View File

@ -1,9 +0,0 @@
BATMAN_CHANNEL=6
BATMAN_CHANNEL_5GHZ=36
ESSID_AP=oldenburg.freifunk.net
ESSID_MESH=batman.oldenburg.freifunk.net
BSSID_MESH=02:CA:FF:EE:BA:BE
NETMON_IP=fe80::201:2ff:fe03:405
VPN_PROJECT=ffol
NTPD_IP=fe80::201:2ff:fe03:405%br-mesh
UPGRADE_PATH=http://firmware.freifunk-ol.de/latest/upgrade/

View File

@ -0,0 +1,79 @@
From 4ba8dbb8e8815ae3988d5844a29f4503e5ccacdb Mon Sep 17 00:00:00 2001
From: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Date: Sun, 17 Sep 2017 21:03:09 +0200
Subject: [PATCH] simple-tc: Use hotplug.d/iface instead of hotplug.d/net
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
.../files/etc/hotplug.d/iface/50-fff-simple-tc | 25 +++++++++++++++++++++
net/simple-tc/files/etc/hotplug.d/net/50-simple-tc | 26 ----------------------
2 files changed, 25 insertions(+), 26 deletions(-)
create mode 100644 net/simple-tc/files/etc/hotplug.d/iface/50-fff-simple-tc
delete mode 100644 net/simple-tc/files/etc/hotplug.d/net/50-simple-tc
diff --git a/net/simple-tc/files/etc/hotplug.d/iface/50-fff-simple-tc b/net/simple-tc/files/etc/hotplug.d/iface/50-fff-simple-tc
new file mode 100644
index 0000000..ef8bd17
--- /dev/null
+++ b/net/simple-tc/files/etc/hotplug.d/iface/50-fff-simple-tc
@@ -0,0 +1,25 @@
+[ "$ACTION" = 'ifup' ] || exit 0
+
+config_load simple-tc
+
+tc_interface() {
+ local iface="$1"
+
+ config_get ifname "$iface" ifname
+
+ [ "$INTERFACE" = "$ifname" ] || return
+
+ config_get_bool enabled "$iface" enabled 0
+
+ [ "$enabled" -eq 1 ] || return
+
+ config_get limit_ingress "$iface" limit_ingress
+ config_get limit_egress "$iface" limit_egress
+
+ [ "$limit_ingress" ] || limit_ingress=-
+ [ "$limit_egress" ] || limit_egress=-
+
+ simple-tc "$DEVICE" "$limit_ingress" "$limit_egress"
+}
+
+config_foreach tc_interface 'interface'
diff --git a/net/simple-tc/files/etc/hotplug.d/net/50-simple-tc b/net/simple-tc/files/etc/hotplug.d/net/50-simple-tc
deleted file mode 100644
index f089f54..0000000
--- a/net/simple-tc/files/etc/hotplug.d/net/50-simple-tc
+++ /dev/null
@@ -1,26 +0,0 @@
-[ "$ACTION" = 'add' ] || exit 0
-
-config_load simple-tc
-
-
-tc_interface() {
- local iface="$1"
-
- config_get ifname "$iface" ifname
-
- [ "$INTERFACE" = "$ifname" ] || return
-
- config_get_bool enabled "$iface" enabled 0
-
- [ "$enabled" -eq 1 ] || return
-
- config_get limit_ingress "$iface" limit_ingress
- config_get limit_egress "$iface" limit_egress
-
- [ "$limit_ingress" ] || limit_ingress=-
- [ "$limit_egress" ] || limit_egress=-
-
- simple-tc "$INTERFACE" "$limit_ingress" "$limit_egress"
-}
-
-config_foreach tc_interface 'interface'
--
2.7.4

View File

@ -0,0 +1,24 @@
From: Robert Langhammer <rlanghammer@web.de>
Date: Mon, 13 Nov 2017 21:04:55 +0100
Subject: fastd_generate_key_from_urandom
diff --git a/net/fastd/patches/001-generate_key_from_urandom.patch b/net/fastd/patches/001-generate_key_from_urandom.patch
new file mode 100644
index 0000000000000000000000000000000000000000..e06739a1e715ab310d9b30ae704f615572d6b4b9
--- /dev/null
+++ b/net/fastd/patches/001-generate_key_from_urandom.patch
@@ -0,0 +1,14 @@
+--- a/src/protocols/ec25519_fhmqvc/util.c
++++ b/src/protocols/ec25519_fhmqvc/util.c
+@@ -47,9 +47,9 @@ void fastd_protocol_ec25519_fhmqvc_gener
+ ecc_int256_t public_key;
+
+ if (!conf.machine_readable)
+- pr_info("Reading 32 bytes from /dev/random...");
++ pr_info("Reading 32 bytes from /dev/urandom...");
+
+- fastd_random_bytes(secret_key.p, SECRETKEYBYTES, true);
++ fastd_random_bytes(secret_key.p, SECRETKEYBYTES, false);
+ ecc_25519_gf_sanitize_secret(&secret_key, &secret_key);
+
+ ecc_25519_work_t work;

View File

@ -0,0 +1,27 @@
From: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Date: Mon, 30 Sep 2019 17:09:10 +0200
Subject: babeld: Include PKG_RELEASE in babeld version
This will account for custom patches added, as otherwise version
would stay the same.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: revise version string]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
diff --git a/babeld/Makefile b/babeld/Makefile
index 056ce43d5ddb461ba94e51a5b18ffac0ef971468..16cc86fe5c2ae8731b0d7d2f64517e9b92d029f9 100644
--- a/babeld/Makefile
+++ b/babeld/Makefile
@@ -50,6 +50,11 @@ MAKE_FLAGS+= \
LDLIBS="" \
LDLIBS+="-lubus -lubox"
+define Build/Configure
+ echo "babeld-$(PKG_VERSION)+fff$(PKG_RELEASE)" > $(PKG_BUILD_DIR)/version
+ $(Build/Configure/Default)
+endef
+
define Package/babeld/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/babeld $(1)/usr/sbin/

View File

@ -0,0 +1,27 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=alfred-json
PKG_VERSION:=0.3.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0-only
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e4cacfc791092389f63c36a435d3f1d069f8a13e
PKG_SOURCE_URL:=https://github.com/FreifunkFranken/alfred-json.git
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/alfred-json
SECTION:=utils
CATEGORY:=Utilities
TITLE:=A.L.F.R.E.D - JSON Client
URL:=https://github.com/FreifunkFranken/alfred-json
DEPENDS:=+jansson +zlib +alfred
endef
define Package/alfred-json/install
$(INSTALL_DIR) $(1)/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/alfred-json $(1)/bin/
endef
$(eval $(call BuildPackage,alfred-json))

View File

@ -0,0 +1,30 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-alfred-monitoring-proxy
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
define Package/fff-alfred-monitoring-proxy
SECTION:=base
CATEGORY:=Freifunk
TITLE:=Freifunk-Franken Alfred-Monitoring-Proxy
URL:=https://www.freifunk-franken.de
DEPENDS:=+curl +micrond +alfred-json +fff-alfred +fff-random
endef
define Package/fff-alfred-monitoring-proxy/description
The Alfred-Monitoring-Proxy is used
to send node status information to
https://monitoring.freifunk-franken.de/
endef
define Build/Compile
# nothing
endef
define Package/fff-alfred-monitoring-proxy/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fff-alfred-monitoring-proxy))

View File

@ -0,0 +1,5 @@
uci set "alfred.alfred.mode=master"
uci commit alfred
exit 0

View File

@ -0,0 +1 @@
*/5 * * * * sleep $(/usr/bin/random 70 85); /usr/sbin/alfred-monitoring-proxy

View File

@ -0,0 +1,7 @@
#!/bin/ash
api_url="https://monitoring.freifunk-franken.de/api/alfred2"
fetch_id="64"
/bin/alfred-json -r "$fetch_id" | \
/usr/bin/curl -k -sS -H "Content-type: application/json; charset=UTF-8" --data-binary @- "$api_url"

View File

@ -0,0 +1,29 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-alfred
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=base
CATEGORY:=Freifunk
TITLE:=Freifunk-Franken Alfred
URL:=https://www.freifunk-franken.de
DEPENDS:=+alfred
endef
define Package/$(PKG_NAME)/description
This is the Freifunk Franken Firmware Alfred package.
This packages configures the Alfred on the device.
endef
define Build/Compile
# nothing
endef
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -0,0 +1,12 @@
>/etc/config/alfred
uci batch <<EOF
set alfred.alfred=alfred
set alfred.alfred.interface='br-client'
set alfred.alfred.mode='slave'
set alfred.alfred.batmanif='none'
set alfred.alfred.start_vis='0'
set alfred.alfred.run_facters='0'
EOF
exit 0

Some files were not shown because too many files have changed in this diff Show More