Commit Graph

79 Commits

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

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

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

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

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

This will make further adjustment easier and clearer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-22 22:33:33 +02:00
Adrian Schmutzler 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 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 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 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
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
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
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 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 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
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 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 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 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
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
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
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
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