Commit Graph

3707 Commits

Author SHA1 Message Date
Matthias Schiffer
3fda210f85
gluon-mesh-{batman-adv,babel}: respondd: use libgluonutil to determine interface type
Also make babel match batman-adv and only emit the wireless/tunnel/other
fields when they are non-empty.

Fixes: #1783
2020-06-01 21:45:33 +02:00
Matthias Schiffer
41b3c91284
libgluonutil: introduce gluonutil_get_interface_lower() and gluonutil_get_interface_type()
gluonutil_get_interface_lower() recursively determines the lower of an
interface until the base interface is found.

gluonutil_get_interface_type() tries do distinguish wired, wireless and
tunnel interfaces. For tunnel interfaces, TUN/TAP, L2TPETH and Wireguard
are supported at the moment.
2020-06-01 21:15:47 +02:00
Matthias Schiffer
6b3b5e706e jenkins-community-slave: use requests library to download slave.jar
Do not mix two different HTTP libraries in one script. This fixes a
warning:

/var/lib/jenkins/slave.py:82: DeprecationWarning: URLopener style of invoking requests is deprecated. Use newer urlopen functions/methods

This simple implementation has the disadvantage that it stores the whole
file in RAM, but this isn't an issue for the 1.5MB slave.jar.
2020-06-01 20:18:24 +02:00
Matthias Schiffer
5232428b19 jenkins-community-slave: verify HTTPS certificate in head() request
Fixes a warning:

/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'build.ffh.zone'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
2020-06-01 20:18:24 +02:00
Martin Weinelt
7fdffcaa1c
Jenkinsfile: require gluon-vmx label for qemu testing
This allows us to make use of builders that can't run virtual machines.

Drop the TMUX environemnt variable, it's not needed anymore.
2020-06-01 19:54:22 +02:00
Matthias Schiffer
72c71d35ac
gluon-mesh-babel: clean up link-local address handling
- Rename obtain_if_addr() to get_linklocal_address()
- Pass buffer of size INET6_ADDRSTRLEN instead of the oversized NI_MAXHOST
- Check if an address is link-local before converting to a string
- Replace an incorrect use of strncmp() with strcmp()
- Return status to caller
- Streamline control flow

While we're at it, the function handle_neighbour(), which is one of the
callers of get_linklocal_address() is slightly cleaned up as well.
2020-06-01 14:50:40 +02:00
David Bauer
6a15c704cd gluon-wireless-encryption-wpa3: switch to hostapd-wolfssl
This switches hostapd variant used for SAE and OWE from hostapd-openssl
to hostapd-wolfssl.

The bug shich one broke the wolfssl implementation was resolved upstream
with commit 631c437a91c2 ("hostapd: backport wolfssl bignum fixes").
This particular commit also got backported to OpenWrt 19.07.
2020-06-01 11:24:24 +02:00
Sven Roederer
5e35fa1ac4
docs/build: add a short summary for some scripts
This summaries giving an overview of a scripts function and a short summary
how it's doing this. Only the scripts are covered, that are used by the
Freifunk-Berlin firmwarebuiler too.

[Matthias Schiffer: slightly reworded some descriptions]
2020-05-31 23:44:34 +02:00
David Bauer
54dcf935d5 modules: update OpenWrt
9cafcbe0bd ar71xx: correct button type for TL-MR3020 mode slider
2bd1cf92e9 ar71xx: fix splitting firmware partition for TL-WR902AC v1
c963e4267b qos-scripts: fix interface resolving
31de4a40e7 broadcom-wl: don't inherit lock descriptor in nas process
2020-05-31 15:57:51 +02:00
Matthias Schiffer
e5456bdf14
build: backport kernel debuginfo ZSTD compression 2020-05-31 11:12:41 +02:00
Jan-Jonas Sämann
ed094bc68c
gluon-core: firewall: Allow custom gluon_wired interfaces (#2041)
This allows for multiple mesh legs out of one box. Useful for offloaders
and networks using vlan for separate mesh transport.
Custom mesh interfaces in a VXLAN domain are otherwise firewalled.

This fixes #1479
2020-05-31 10:57:58 +02:00
Matthias Schiffer
7279c4017e
build: target_lib: allow to specify multiple factory_ext values
By passing a table instead of a single string, multiple different
extensions can be specified, each refering to a separate image file
generated by OpenWrt.

This is not supported for sysupgrade (as there can only be a single
image in the format expected by OpenWrt).
2020-05-31 02:20:58 +02:00
Matthias Schiffer
8c386719eb
build: target_lib: do not pass manifest_aliases when defining factory and extra images
manifest_aliases only make sense for sysupgrade images.
2020-05-31 02:20:58 +02:00
Matthias Schiffer
3ce43329f5
build: remove now-unneeded function from target_config_lib.lua
target_config.lua and target_config_check.lua don't pass a table of
callbacks anymore, so target_config_lib.lua can by simplified by moving
all the code that was in the returned function to the toplevel.
2020-05-31 02:20:58 +02:00
Matthias Schiffer
9e23534ec3
build: rework config generation
So far, we were using a sort operation on the generated .config to
implement precedence of =y packages over =m, and =m over unset.
Unfortunately, this sort not only used for packages, but for all config
lines. This made it impossible to override settings from targets/generic
in a target config when the new setting was sorted before the generic
setting.

To fix this, track configurations by their keys, so we can properly
override config keys that were set before. Value-based precedence is
only preserved for package configuration.

The config() and try_config() calls always take key and value as
separate arguments now. Strings are quoted automatically; the values
true, nil and false map to y, m and unset for tristate options. config()
can take an optional third argument to override the error message to
display when the setting fails to apply.

All existing target configs generate the same .config with the old and the
new code. The new code is also a bit faster on targets with many devices.
2020-05-31 02:20:58 +02:00
Martin Weinelt
97e5434b32
docs: clarify beacon_interval documentation
A microsecond is commonly abbreviated as µs. This prevents confusions
between micro- (µs) and milliseconds (ms).
2020-05-30 22:20:41 +02:00
Ruben Barkow-Kuder
de1b214c55 docs: enhance OWE documentation 2020-05-30 19:06:48 +02:00
David Bauer
e951ff6e21 gluon-core: add support for configuring the beacon interval
This adds support for the beacon interval to be set on a per-band base.
This has the potential to reduce the amount of airtime used up for
sending beacon frames.
2020-05-30 00:47:33 +02:00
Jan-Tarek Butt
22847e4986
gluon-reload: add missing service restarts on domain switching
[Matthias Schiffer: fix up start/stop order and file permissions]
2020-05-28 23:30:25 +02:00
Matthias Schiffer
20c7fd9881
Merge pull request #2011 from freifunk-gluon/board-json-addresses
Look up primary MAC address through board.json for LAN/WAN
2020-05-28 22:30:14 +02:00
David Bauer
b1de28bab1 gluon-core: move wireless-related utils to wireless module
Separate wireless-related helper methods from the util module to a
new wireless module. This keeps them separated, as the amount of
wireless helpers increased in the past, justifying a separate module.
2020-05-28 21:46:23 +02:00
Matthias Schiffer
fcc6877c8b gluon-core: build in xt_CT with GLUON_SPECIALIZE_KERNEL
xt_CT was added to kmod-ipt-conntrack a while back. Update our
GLUON_SPECIALIZE_KERNEL rules accordingly.

When building xt_CT into the kernel, one of the symbols IP_NF_RAW and
IP6_NF_RAW must be enabled as well, even though there is no runtime
dependency when building as modules. The kernel grows by less than 1KB
even when both IP_NF_RAW and NETFILTER_XT_TARGET_CT are enabled, making
this change a (very slight) net win in both flash and RAM usage.
2020-05-28 19:40:29 +02:00
Matthias Schiffer
7e8af99cf5 generic: reduce squashfs block size to 256KiB
In OpenWrt 19.07, the block size was increased to 1024KiB for "tiny"
devices by default to save flash. Unfortunately, this also significantly
increases the cache memory required by squashfs.

In my test, the increased block size reduced the image size by ~64KiB,
but increased the RAM usage by ~2.6MiB. As most tiny devices have only
32MiB of RAM, this is not a reasonable tradeoff.

The ar71xx-generic target already defines an even lower block size of
64KiB.
2020-05-28 19:40:29 +02:00
Matthias Schiffer
1cb97ad63e generic: remove kmod-ipt-offload
This is unused by Gluon.
2020-05-28 19:40:29 +02:00
David Bauer
c3be82f6c8 modules: update OpenWrt
83b714a27f musl: fix locking synchronization bug
f99b1d1d92 rpcd: update to latest openwrt-19.07 Git HEAD
92bd395b04 Revert "rpcd: update to latest Git HEAD"
adf5d753ef rpcd: update to latest Git HEAD
9b48375c7e libubox: update to the latest version
a4e8eca03e libubox: update to the latest master
498f1f4f5d ramips: gsw_mt7621: disable PORT 5 MAC RX/TX flow control by default
d8d1956a80 hostapd: backport wolfssl bignum fixes
ab7e9754df ucert: update to latest git HEAD
bc0c2db2a3 brcm47xx: disable Netgear WNR2000 v2 by default
059db419d7 squashfs: Fix compile with GCC 10
97b522a1f9 usign: update to latest git HEAD
942262f9c8 usign: update to latest Git HEAD
6a89098935 ath79: add support for TP-Link TL-WA901ND v4 and v5
a6f70f2e97 ath79: add support for TP-Link TL-WA701ND/730RE/801ND/901ND v1
8c6c488e9e ath79: add support for TP-Link TL-WR940N v6
36d4140517 ath79: add support for TP-Link TL-WA830RE v1
7187826b8b ath79: reorganize DTSI for ar7240 TP-Link devices
d4092eac1f ath79: migrate TP-Link TL-MR3420v2 to ath79
24cfd961d9 ath79: add support for TP9343-based TP-Link TL-WR94x devices
7de43d66ff generic: platform/mikrotik: disambiguate SPDX-License-Identifier
84154574c8 ramips: drop non-existant ralink,port-map for Ravpower WD03
af667c73c5 bcm63xx: mask interrupts on init
d1ce73677c bcm63xx: periph_intc: report effective affinity
1d40c8a9f2 bcm63xx: ext_intc: fix warning
65f2fae911 bcm63xx: periph_intc: fix warning
b2c9f82eb4 bcm63xx: redboot: fix warning
a2a3ac9f51 bcm63xx: bcm6362: fix pinctrl bug
6c96ecf3b4 bcm63xx: refresh kernel config
c3e3802a8e OpenWrt v19.07.3: revert to branch defaults
f3f38f40da OpenWrt v19.07.3: adjust config defaults
85e04e9f46 generic: platform/mikrotik: fix LZOR support
4cd9ae41c5 libjson-c: backport security fixes
6ffd4d8a4d ar71xx: remove hard-coded folder name from Mikrotik RB upgrade
d2ee15ef76 fstools: blockd: fix segfault triggered by non-autofs mounts
4cd44e5dc7 ar71xx: mikrotik: mach-rbspi.c remove wlan id
3fecb06fb1 ar71xx: mikrotik: bypass id check in __rb_get_wlan_data()
b36aa168d8 ar71xx: mikrotik: ath10k: use new sysfs driver
fa2369e59b generic: platform/mikrotik: support LZOR encoding
612b64e6c4 ar71xx: enable mikrotik platform driver
511859de9b generic: mikrotik platform build bits
ddae86cc69 generic: routerboot sysfs platform driver
2efcfb1d1a kernel: bump 4.14 to 4.14.180
ecea10f2b9 ath79: dts: add missing 'serial0' alias for TP-Link TL-MR3040v2
2020-05-27 02:12:44 +02:00
Ruben Barkow-Kuder
891bfc77ac
gluon-client-bridge: simplify boolean expressions (#2031) 2020-05-25 01:13:30 +02:00
Matthias Schiffer
14ab51876e
scripts: update-patches: fix shellcheck 0.7.1 lint 2020-05-25 01:10:18 +02:00
Matthias Schiffer
653e547b82
fastd: update to v19 2020-05-22 21:18:29 +02:00
lemoer
14481851f6
gluon-status-page: show primary_domain 2020-05-21 18:09:08 +02:00
lemoer
b9c1a026b1
gluon-respondd: emit "primary_domain_code" in nodeinfo
Closes #1974

Situation:
==========

$ ls -l /lib/gluon/domains/lindennord.json
lrwxrwxrwx    1 root     root            10 Jan  6 03:42 /lib/gluon/domains/lindennord.json -> dom17.json

Before:
=======

$ gluon-neighbour-info -d ::1 -p 1001 -r nodeinfo -c 1
{
   "node_id": "525400123456",
   "system": {
     "domain_code": "lindennord",
     "site_code": "ffh"
   },
...
}

After:
======

$ gluon-neighbour-info -d ::1 -p 1001 -r nodeinfo -c 1
{
   "node_id": "525400123456",
   "system": {
     "primary_domain_code": "dom17",
     "domain_code": "lindennord",
     "site_code": "ffh"
   },
...
}
2020-05-21 18:09:05 +02:00
lemoer
bcf57467dd libgluonutil: implement gluonutil_get_primary_domain()
Implemented using readlink() and basename() to the selected domain in
/lib/gluon/domains/${DOMAIN}.json.
2020-05-21 18:08:36 +02:00
lemoer
0c2a52c19f
libgluonutil: fix double free of domain_code when domain is not existing 2020-05-21 18:03:58 +02:00
Matthias Schiffer
121609b3f8
Merge pull request #2010 from txt-file/x86-legacy
Add x86-legacy subtarget
2020-05-17 09:22:18 +02:00
Vieno Hakkerinen
d353ad35fe actions: add x86-legacy build workflow 2020-05-17 00:06:03 +02:00
Vieno Hakkerinen
87aecd5ab5 targets: add x86-legacy subtarget
As x86-generic is compiled to pentium4 (and newer) there is a need for
a subtarget for older devices. The x86-legacy subtarget is set to
compile to pentium (and newer) and should support even very old devics.

x86-legacy includes the packages from x86.inc to only maintain one
package list. The three excludes are because the packages do not exist
for x86-legacy.
2020-05-16 23:58:46 +02:00
Matthias Schiffer
55c51f2a73 actions: script improvements
- Rely on shebang instead of setting shell in workflow
- Run whole install-dependencies.sh in sudo
- Use /bin/sh instead of bash
- set -e
2020-05-13 15:48:06 +02:00
Matthias Schiffer
2889904e5f actions: set BUILD_LOG=1 and store logs as artifacts
The new step is added with `if: ${{ !cancelled() }}`, so the logs are
stored even when the build fails.
2020-05-13 15:48:06 +02:00
Matthias Schiffer
ab6596115a build: introduce GLUON_AUTOREMOVE flag 2020-05-13 15:48:06 +02:00
lemoer
57516fe4e7
Add GLUON_MINIFY flag to allow skipping the minification process (#1916) 2020-05-13 00:45:06 +02:00
Matthias Schiffer
992457b203
Merge pull request #2024 from SvenRoederer/patch-1
build: ignore deactivated feeds
2020-05-12 20:40:48 +02:00
Matthias Schiffer
3daacfb92e
Merge pull request #2013 from freifunk-gluon/outdoor-setup-ifname
Reuse outdoor device logic for setup mode interface selection, plus some cleanup
2020-05-12 20:39:30 +02:00
Sven Roederer
184dab8fc1 build: ignore deactivated feeds
The OpenWrt feeds.conf.defaults contains some feeds that are commented out
and not active. Such feeds will be returned by the default_feeds.sh script
anyway and causing pseudo feeds. Limit the script to only return active
feeds, by filtering out lines starting with '#'.
This usually only applies to the OpenWrt master branch.

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>

change as per NeoRider
2020-05-12 19:46:36 +02:00
Matthias Schiffer
b842ec43ff gluon-mesh-batman-adv: do not override WAN MAC address with VXLAN
As a partial fix to #496, do not touch the MAC address of the WAN
interface when using VXLANs (as only the MAC address of the VXLAN
interface matters to batman-adv).
2020-05-12 17:02:37 +02:00
Matthias Schiffer
a3569da164
Revert "build: use .SILENT instead of adding @ to each recipe"
This reverts commit 2a8943e516.

.SILENT gets passed down to OpenWrt make as -s through MAKEFLAGS. This
hides certain messages from the build log with V=s.
2020-05-12 01:00:57 +02:00
Matthias Schiffer
4540217342
build: target_config_check: dedup error messages
Certain error message (for example invalid package names) were emitted
once for each device.
2020-05-11 00:09:13 +02:00
Matthias Schiffer
9379137373
Merge pull request #2021 from freifunk-gluon/fastd-peer-cleanup
gluon-mesh-vpn-fastd: clean up peers and groups on update
2020-05-10 18:11:48 +02:00
Matthias Schiffer
8807c76a34
gluon-setup-mode: remove obsolete sysconfig.config_ifname migration
config_ifname was renamed to setup_ifname in Gluon v2015.1.
2020-05-10 16:38:42 +02:00
Matthias Schiffer
e9687d7ef1
gluon-setup-mode: use is_outdoor_device() for setup_ifname selection
On PoE-powered devices, we usually want to use WAN for the setup mode.
As all outdoor devices are PoE-powered, we can reuse this function. This
switches the setup mode interface for new installations / after config
reset on a few devices that were missing in this list before.
2020-05-10 16:38:42 +02:00
Matthias Schiffer
0dd9a3e07c
gluon-core: platform: add 2.4GHz-only outdoor devices 2020-05-10 16:38:41 +02:00
Matthias Schiffer
f4fe58cfd7
gluon-core: ignore is_outdoor_device() value on devices without 5GHz radio 2020-05-10 16:38:41 +02:00