Compare commits

...

65 Commits

Author SHA1 Message Date
Martin Weinelt
f1f7f616aa
Merge pull request #2624 from freifunk-gluon/backport-2594-to-v2021.1.x 2022-08-29 14:16:58 +02:00
Matthias Schiffer
77dfea9cdd gluon-mesh-vpn-fastd: fix respondd segfault under load
When running "fastd -v" fails, line may be NULL, causing a segfault in
strncmp.

(cherry picked from commit 8dd0f32c18)
2022-08-28 20:46:40 +00:00
David Bauer
0c17f5fb8b
modules: update OpenWrt (#2608)
83b0e20711 ramips: fix RT-AC57U button level

Signed-off-by: David Bauer <mail@david-bauer.net>

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-08-12 00:45:07 +02:00
David Bauer
5a9ebce31f
modules: update OpenWrt (#2608)
83b0e20711 ramips: fix RT-AC57U button level

Signed-off-by: David Bauer <mail@david-bauer.net>

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-08-12 00:44:48 +02:00
nrbffs
595abcf8cb
ath79: add patch to fix serial console and sysupgrade on OR750 (#2512)
The serial console on the Joy-IT OR750i doesn't work, because the UART
node is disabled in device tree. This also breaks sysupgrade.

The issue is already fixed upstream in OpenWRT by
7054721cf94f4aa8fe71ac4c28c922b19a69ba1d ("ath79: enable UART in SoC
DTSI files"), but since 19.07 doesn't support the OR750, we need our own
patch.

Signed-off-by: Nico Boehr <freifunk@nicoboehr.de>

Co-authored-by: Nico Boehr <freifunk@nicoboehr.de>
2022-05-08 12:12:15 +02:00
Matthias Schiffer
d0f43aeb08
Merge pull request from GHSA-xqhj-fmc7-f8mv
ecdsautils: verify: fix signature verification (CVE-2022-24884)
2022-05-05 18:02:38 +02:00
Matthias Schiffer
dcfa4522b3
Gluon v2021.1.2 2022-05-04 20:08:17 +02:00
Matthias Schiffer
6ccad98fc0
Update copyright years 2022-05-04 20:08:04 +02:00
Matthias Schiffer
7332d33775
docs: releases/v2021.1.2: describe autoupdater security issue 2022-05-04 20:01:53 +02:00
Matthias Schiffer
2b5d4b88b4
ecdsautils: verify: fix signature verification (CVE-2022-24884)
A vulnerability was found in ecdsautils which allows forgery of ECDSA
signatures. An adversary exploiting this vulnerability can create an update
manifest accepted by the autoupdater, which can be used to distribute
malicious firmware updates by spoofing a Gluon node's connection to the
update server.
2022-05-03 07:36:23 +02:00
Matthias Schiffer
422e20c8da
docs: add v2021.1.2 release notes (#2488) 2022-05-02 23:37:48 +02:00
Matthias Schiffer
cf1b550517
Merge pull request #2486 from freifunk-gluon/v2021.1.x-update-modules
v2021.1.x: update modules
2022-04-21 23:54:06 +02:00
Matthias Schiffer
386fd5b101
modules: update OpenWrt packages
1c5e4c80f49b zabbix: update to version 4.0.37
2022-04-21 17:50:33 +02:00
Matthias Schiffer
7fc3fdc232
modules: update OpenWrt base
ecbbb373edf7 wolfssl: fix compilation with /dev/crypto
f6e22f0956a1 OpenWrt v19.07.10: revert to branch defaults
d03dc49943db OpenWrt v19.07.10: adjust config defaults
9ce6aa9d8d8a wolfssl: bump to 5.2.0
698cdf02020a mac80211: Update to version 4.19.237-1
26a8be9c9814 kernel: generic: add missing symbol for arm64 spectre mitigation
ae2af91edddd kernel: generic: reorder kernel config options
058c2347c51f imagebuilder: fix broken image generation with external targets
d39a6c67dcb4 kernel: bump 4.14 to 4.14.275
9aa35fada652 patchelf: backport fix for rpath endianness
2022-04-21 17:49:58 +02:00
Matthias Schiffer
ad430d33fa
Merge pull request #2401 from freifunk-gluon/v2021.1.x-update-modules
v2021.1.x: update modules
2022-03-30 00:36:51 +02:00
Matthias Schiffer
4aa73858a2
modules: update Gluon packages
f9ef3fc7d9d7 treewide: change Github URLs from git:// to https:// (#252)
2022-03-29 18:31:09 +02:00
Matthias Schiffer
ad786c7816
modules: update routing packages
8f23999365de ahcpd: use SHA256 hash and use HTTPS everywhere
04e7f66aa770 mcproxy: Fix compilation with uClibc-ng
bf77e5f0e026 cjdns-tests: Don't build on ARC (#487)
01417ad6817a cjdns: Do not build on ARC
653ec59929cc olsrd: remove empty .gitignore file
3f095f7f7ef0 pimbd: add PKG_MIRROR_HASH
c1a2f7a25255 oonf-olsrd2: add PKG_MIRROR_HASH
2f9236d864ac oonf-dlep-radio: add PKG_MIRROR_HASH
20f3e5171029 oonf-dlep-proxy: add PKG_MIRROR_HASH
e05cb068c499 olsrd: add PKG_MIRROR_HASH
e37cf04da41a ohybridproxy: add PKG_MIRROR_HASH, refresh patch
95cd0ce4b5a1 mrd6: add PKG_MIRROR_HASH
00eacef47b5e minimalist-pcproxy: add PKG_MIRROR_HASH
84b7b3c55337 mcproxy: add PKG_MIRROR_HASH
f17815946a1b hnetd: add PKG_MIRROR_HASH, refresh patch
372ec6288639 cjdns: add PKG_MIRROR_HASH
ce5adaab9520 CI: fix multi-arch-test-build for 19.07 branch
2ed5a04ab819 CI: fix runtime testing for non master branch
c755ab8dce1c issuetemplate: reference foreign repos
cccff55a6288 CI: fix building multi-arch-test-build
63625f7e1987 CI: copy .github from openwrt-packages
df9f33c52277 batman-adv: Merge bugfixes from 2022.0
7a3e63fd45fe batman-adv: Merge bugfixes from 2021.4
c8734df67719 batman-adv: Refresh patches with quilt
3c10076826a5 batman-adv: Merge bugfixes from 2021.2
2022-03-29 18:31:09 +02:00
Matthias Schiffer
48f6a11e33
modules: update OpenWrt packages
5a842639dc87 nano: provide nano-full with most features enabled
165c5625a3c6 netatalk: update to version 3.1.13
7b9c8fd48743 coova-chilli: add dependency for miniportal
6732d0573d62 coova-chilli: clean up Makefile
6ac4167c7318 coova-chilli: remove dnslog option
384c9dc68fed coova-chili: Fix version
944bae08d00c coova-chilli: Update to 1.5
3398ed29b0c0 python3: Update to 3.7.13, refresh patches
e8dc42753c64 bind: bump to 9.16.27
17e7ca6e2e66 syslog-ng: update to version 3.36.1
79db9a8e246e expat: import patches for CVEs
448eb6e4b999 expat: update to 2.2.10
31098bd6b274 htpdate: drop www.freebsd.org from default server list
4c461f9e8559 nano: update to 6.2
8129d30e3653 nano: update to 6.1
e234ea1ae48b ruby: update to 2.6.9
c0c89af7c4fa bind: update to version 9.16.25
56cf18027b67 CI: fix runtime testing for non master branch
5578d60f9ad9 nano: Add a plus variant with more features
864ffb6ca1b9 nss: backport patch for CVE-2021-43527
0af741cd16ce prosody: update to version 0.11.13
20e42ca81e02 prosody: fix shellcheck warnings
0319712eda5e prosody: update to 0.11.7
22a3a54a9c8a prosody: update to 0.11.5
199860fa3ad3 prosody: /etc/prosody permissions fix
498bcd4e25c7 prosody: Update to 0.11.3
057803706e99 tvheadend: fix conffiles section
765307772f15 domoticz: backport patch to fix compilation with uClibc-ng
572392a8ac20 domoticz: bump to 4.10717
8d91ba86a956 domoticz: Fix compilation without deprecated OpenSSL APIs
7bb0a7e929cb netdata: Update init script to use -D rather than -nd
6317eabad70e apache: security bump to 2.4.51
4af8afe6ccde haveged: update to 1.9.17
f299c29a45fc treewide: add missing BUILDONLY
64d0238a1bef zsh: drop bash syntax in postinst
ea3e54accd11 zsh: fix invalid postrm script and little refactor of scripts
5a9b5ee78cd2 nano: update to version 6.0
e1a2d908c3de msmtp: update to version 1.8.1.9
535f4804b661 postgresql: security update to version 11.14
e93fc5a20f57 libs/c-ares: fix domain hijacking CVE-2021-3672
45218f20597b msmtp: update to version 1.8.17
d216572bb147 syslog-ng: update to version 3.35.1
1d5b64958b79 icu: Fix memory bug w/ baseName
e1feccd5aeb7 ddns-scripts: Fix wrong whitespace in preinst and postinst scripts
c559096e03e5 bind: update to version 9.16.23
af8fe2363d07 cyrus-sasl: patch CVE-2019-19906
903d79b3872b php7: Clean up and update distributed php.ini for php 7.2.34
496f50a754cf syslog-ng: update to version 3.34.1
61741b3249d6 ffmpeg: update to version 3.4.9 (security fix)
9abe24fb49fa bind: Bump to 9.16.22
cb4433c4baa1 tvheadend: update libhdhomerun
18af9b9e2132 bind: update to version 9.16.21
bb0ed00885eb nextdns: Update to version 1.37.3
c493a603cdbf vpn-policy-routing: downgrade to 0.2.1-13
20a9e8700b3d python-dateutil: Add missing HOST_PYTHON3_PACKAGE_BUILD_DEPENDS
e933f6f749aa python-importlib-metadata: Pin setuptools-scm version
a5de193e5422 simple-adblock: update to 1.8.8-1
af3643f9b00d https-dns-proxy: update to 2021-09-27
f2af6941fa2b tor: update to 0.4.5.10
746fa830c6d7 python-zipp: pin setuptools-scm version
70bb6f15e8df perl: perlmod.mk: use flock when hostpkg/perl used
15305d2f2ee6 nano: update to 5.9
ece1d7bfcebf haveged: update to 1.9.15
2d35019d6bee lighttpd: update to lighttpd 1.4.55 release hash
b101f744c258 tcpreplay: avoid host lib leakage
be17f9726509 tcpreplay: bump to version 4.3.4
6e4e0d5e9dfd tcpreplay: add libdnet support
e7167f4702b5 tcpreplay: fix compilation with Arch Linux
668aa95dfb15 tcpreplay: bump to version 4.3.3
6dc494fddf3b ntfs-3g: patch CVE-2019-9755
02ce5303d5a8 nextdns: Update to version 1.37.2
7a7b8a257b59 bind: update to version 9.16.20
d8ef698a9fc9 cgi-io: update to latest Git HEAD
6c5169b3956b cgi-io: update to version 2020-10-27
daaacfd24e74 cgi-io: move into out of tree project
d5a7aa18618c haproxy: Update HAProxy to v2.0.25
17f5a0cc8362 python3: update to version 3.7.12
dd6be653dd8b tor: update to version 0.4.4.9
508c15acb77a irssi: update to 1.2.3
93cfd1679a6f nextdns: Update to version 1.37.1
6f3cd160d273 nextdns: Update to version 1.37.0
72f35e712e9f acme: Fix uhttpd restart to load new certificates
684b71f0cddc click: update to version 7.0
5bd73795e8fc dnsdist: fix default SSL lib spelling
1dd040f9ca89 treewide: Remove GO_PKG_LDFLAGS for stripping binaries
82a3613ec8ad nginx: add PROVIDES nginx-ssl to nginx-all-module
b35c3984e1fd Revert "net/miniupnpd: ext_ip_reserved_ignore support"
72d806d18145 apr: patch CVE-2021-35940
9d3ad065b294 nextdns: Update to version 1.36.0
4b091361ef48 postgresql: disable PIC
0573fb59ab33 file: update to 5.38
b03fe54e0e98 https-dns-proxy: patch CMakeList.txt to use OpenWrt CFLAGS
8ff2671b222e tar: fix CVE-2021-20193
3862bb3e6d65 mc: add a missing Syntax file
47e2ef579e90 git: update to 2.26.3
b39f185bdf90 mc: update to 2.8.27
865ae46492ab unixodbc: use 'install' when copying host binaries
67f403b5e6af perl: perlmod.mk: use 'install' for host binaries
5051c4bb0074 knot: update to version 3.0.8
e0f5b4e2891d knot: update to version 3.0.7
de894d37a666 knot: update to version 3.0.6
0c3d97bf5725 knot: update to version 3.0.5
210e3d9167be https-dns-proxy: update to 2021-07-29-01
a0e39ca02c57 nextdns: Update to version 1.35.0
92abb9917028 adblock: bugfix 4.0.7-9
0872827d2dee librouteros: don't build docs
f31271fed30f net/snort3: Include default configs and snort2lua
de84e781e5b6 syslog-ng: update to version 3.33.2
242dbcebafb9 yggdrasil: bump to 0.4.0
df79c0614cbd vpnbypass: updates to 1.3.2-1
f795536f4884 ruby: update to 2.6.8
a673a232686b addrwatch: Various fixes
1f9aa31eab77 addrwatch: fix broken conffiles
531d59dbc733 addrwatch: update to 1.0.2
ce1781155dfd addrwatch: Add missing limits header for PATH_MAX
879838998e13 luajit: for powerpc, add FPU dependency
be2f1b2c0041 luajit: fix compilation with host clang
29c5a802c4d8 [LuaJIT] Allow MIPS64 support
e5e5c889196b luajit: do not install static libraries to InstallDev
dd627367847d luajit: use dynamic buildmode
192aea109ad6 yggdrasil: allow HTTPS connections
7248e1b957a5 yggdrasil: bump to 0.3.16
fe9b2579f984 yggdrasil: bump to 0.3.15
8687d79f8478 yggdrasil: Ygg-over-ygg bugfix
35531bcb26a0 yggdrasil: bump to 0.3.14
3232f272430a yggdrasil: bump to 0.3.13
2136fafe397d yggdrasil: bump to 0.3.12
05816dbfd83c yggdrasil: Change package configuration to UCI
325bf6bc7540 yggdrasil: fixes build name and version #10309
7087b16140da yggdrasil: uci firewall Section name and cover both IP versions - rename the section instance to yggdrasil (feat. request) - allow zone to cover both ip4 and ip6 fam
56b6518c8898 yggdrasil: bump to 0.3.11
b83f6f9af340 syslog-ng: disable mqtt
c0e93ddff35e libuv: fix CVE-2021-22918
39a92140d19a syslog-ng: update to version 3.33.1
dd32c2cbeeef czmq: disable nss
b7d2b9163cf6 apache: update to 2.4.48
a16402770c32 czmq: update to version 4.2.1
1cd6a5f01992 bind: update to version 9.16.18
b86ca1563ba3 lxc: add patch to switch GPG server
dc621a9b195f snort3: Backport stable version from 21.02
5d189c1013a6 libdaq3: New package, dependency of snort3
d6b64bb65368 msmtp: update to version 1.8.15
a2ab06243970 youtube-dl: update to version 2021.4.7
118b0cb9d608 youtube-dl: update to version 2021.2.10
b18aab0d13f9 python3: update to version 3.7.11
9bcac7859a80 nextdns: Update to version 1.34.2
2294d252b3ef ddns-scripts: standardize required params declaration
730e14da79f6 python-dateutil: pin setuptools-scm version to 5.0.2
d1aac139a698 Revert "python-dateutil: disable setuptools-scm for build"
29da5d65b6dc python-dateutil: disable setuptools-scm for build
b955b6943504 nextdns: Update to version 1.33.11
0f5fbe1f5bfd nano: update to 5.8
ce1ae404c3a6 net/mosquitto: Update to 1.6.15
9355f9503d17 ksmbd: update to 3.3.7
2c328f3d8abd ksmbd: update to 3.3.6
08d1a66e3d9f ksmbd: update to 3.3.5
2022-03-29 18:30:44 +02:00
Matthias Schiffer
5562682b43
modules: update OpenWrt base
b24905c38a8a kernel: bump 4.14 to 4.14.274
a518a4f78630 ath79: fix link for long cables with OCEDO Raccoon
ea0e521d3706 kernel: bump 4.14 to 4.14.273
0af411f49d43 zlib: backport security fix for a reproducible crash in compressor
565159db573a kernel: bump 4.14 to 4.14.272
c5c047f19bc5 openssl: bump to 1.1.1n
6b8407c6da66 base-files: call "sync" after initial setup
9ced994057ae kernel: bump 4.14 to 4.14.269
5ecc7ead4878 imagebuilder: fix partition signature
f49eec6335ea wolfssl: fix API breakage of SSL_get_verify_result
cc344f1513ee ubus: backport fixes for UAF and other issues
31bb27f35b95 wolfssl: bump to 5.1.1-stable
572a1f9abe45 ar71xx: fix MikroTik wAP detection
a2482fc3a57c OpenWrt v19.07.9: revert to branch defaults
106382c27c25 OpenWrt v19.07.9: adjust config defaults
2a3558b0de17 kernel: bump 4.14 to 4.14.267
3b6ce4f634cc kernel: bump 4.14 to 4.14.266
e7596ce0b085 hostapd: Apply SAE/EAP-pwd side-channel attack update 2
1691c1168d15 mbedtls: Update to version 2.16.12
419b9f4c4514 mbedtls: update to 2.16.11
bfa4cccd46c3 tcpdump: libpcap: Remove http://www.us.tcpdump.org mirror
e92a4e5458ff tcpdump: Fix CVE-2018-16301
606106fb295e kernel: bump 4.14 to 4.14.265
524cbcf6f5b0 build: store SOURCE_DATE_EPOCH in JSON info files
57293f51c48f kernel: bump 4.14 to 4.14.264
974161d7f891 kernel: bump 4.14 to 4.14.262
b50eb70e01c6 openssl: bump to 1.1.1m
5369ceb787b4 kernel: bump 4.14 to 4.14.261
2022-03-29 18:29:50 +02:00
Matthias Schiffer
2b5c1e57fc
docs: move release notes TOC to sub page (#2422)
This allows us to organize the TOC a bit better by adding sections per
major version. We can even increase the maxdepth to 2 now, which looks
great in my opinion.

In addition, the full list of releases is not shown in the sidebar
anymore when viewing a completely different part of the documentation,
which took up more than half of the total sidebar entries.

(cherry picked from commit 7ebc88147e)
2022-03-23 20:36:09 +01:00
Matthias Schiffer
f77f3829fb
Merge pull request #2402 from herbetom/v2021.1.x-container.sh
v2021.1.x: Backport container.sh script
2022-02-24 16:26:22 +01:00
Tom Herbers
2099d8e9be
scripts/container.sh: allow for empty Branch Names and git errors (#2363)
Resolves #2362

(cherry picked from commit 17731ae8fd)
2022-02-24 01:09:02 +01:00
Martin Weinelt
e7e634396e Add helper to run a containerized build environment (#2292)
Using `make container` or, if you don't have automake/gmake on your host
system, `./scripts/container.sh` will build an image for the current
branch your are on and drop you into a shell running inside a container
using that image.

From there all tooling required to work on Gluon is available.

Supports both podman (preferred) and docker.

(cherry picked from commit 6728c4a103)
2022-02-24 01:08:07 +01:00
David Bauer
e51836ecf1
Merge pull request #2390 from freifunk-gluon/v2021.1.x-backports
Backports for v2021.1.x
2022-02-23 23:11:18 +01:00
T-X
0da2a7c431
gluon-neighbour-info: fix broken output with large results (#2322)
Currently a buffer with a fixed size of 8192 bytes is used. However the
result can potentially be larger, which leads to a truncated JSON
output on stdout. UDP packets, without compression and with IP
fragmentation, can be up to 64KiB large.

Instead of using a fixed size buffer on the stack ask the kernel first
about the size of the UDP data and allocate a buffer of appropriate size
on the heap before receiving the UDP data.

The issue was observed with a custom respondd provider.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
(cherry picked from commit 531937cf6f)
2022-02-22 18:57:39 +01:00
Martin Weinelt
ff4050d873
patches: build perl single-threaded (#2392)
Prevents spurious build failures.

(cherry picked from commit 545d1cbb11)
2022-02-22 18:57:02 +01:00
Matthias Schiffer
bf8e97014b
gluon-config-mode-core: discard gluon-reconfigure output (#2395)
The stdout output of gluon-web scripts is directly sent to uhttpd,
becoming a part of the HTML output or even replacing HTTP status or
headers. The output of gluon-reconfigure is not supposed to end up
there.

While we're at it, also add an exec to avoid an unnecessary shell
process.

(cherry picked from commit eea49a2834)
2022-02-22 18:54:53 +01:00
Igor Scheller
64bf4d1b53
gluon-web-osm: Fix " rendering in attribution with CDATA tag (#2398)
(cherry picked from commit bbc00017a9)
2022-02-22 18:54:53 +01:00
Matthias Schiffer
1e4cf25eb4
gluon-web-osm: update OpenLayers default URL to 5.3.0
The OpenLayers JS/CSS download URL is dead. Update it to make the map
work again:

- Update from OpenLayers 5.2.0 to 5.3.0
- Switch from the obsolete rawgit.com URL to jsdelivr.net (rawgit.com
  was only redirecting to jsdelivr.net for the last few years anyways)
- Set a fixed commit in the URL, so the URL doesn't become outdated again

(cherry picked from commit 62b24ed7ce)
2022-02-15 18:18:50 +01:00
Matthias Schiffer
1837b1e2b3 gluon-web: prohibit cross-origin POST
As gluon-web uses standard multipart/form-data requests, browsers don't
enforce any cross-origin restrictions. To prevent malicious injection of
POST requests into the config mode, match the Origin header against the
Host header of the request.

(cherry picked from commit a83466be6e)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
f4ae80e73b gluon-web: improve error handling of parse_message_body()
Actually raise an error and turn it into an HTTP 400 return code when
something goes wrong, rather than ignoring the error.

We also improve the conditions under which errors are thrown before
pump() is called: We don't need to check for the multipart/form-data
content-type twice, and a POST without this content-type is now always
an error.

(cherry picked from commit f3960eeb47)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
46dce5747b gluon-web: add CRLF to text/plain Internal Server Error output
Having a trailing newline is nice when viewing the returned data in a
terminal.

(cherry picked from commit de43b306d4)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
b41cf74509 gluon-web-*: remove unused "token" form value
This was a remnant of LuCI that was never used in gluon-web.

(cherry picked from commit 94519cfc56)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
107ffe6d3b workflows: lint: switch from apt to apt-get -y, add update
Using apt in scripts is discouraged. Also add an update to hopefully fix
the lua-check installation failure in CI.

(cherry picked from commit c75d90d9ab)
2022-02-03 17:08:07 +01:00
J. Burfeind
16545edf3e gluon-status-page: split bwlimit into two lines (#2371)
Fixes: 1cb0fc84fc ("gluon-status-page: swap bandwidth limits (#2304)")
Resolves #2370

(cherry picked from commit 7427ba2280)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
ae1023ac3a gluon-status-page: use UCI + iwinfo to get channel information
The network.wireless status ubus call only returns the configured
channel from UCI, breaking the status page in outdoor mode, where the
configuration contains 'auto' instead of a number.

Fixes: 0d3fa6b59b ("gluon-status-page: use ubus to get radio channels")
Closes #2336

(cherry picked from commit 201e1597b1)
2022-02-03 17:08:07 +01:00
aiyion.prime
b623378a5f gluon-status-page: fix lastImage in Signal()
(cherry picked from commit 1944ea0e01)
2022-02-03 17:08:07 +01:00
aiyion.prime
2f2d41119b gluon-status-page: fix address_to_groups()
In js `return` does behave like `continue` in a forEach() iteration.
The fixed function was intended to return nothing on error and does so
now, instead of a shorter (useless) array like before.

(cherry picked from commit 8c85be2125)
2022-02-03 17:08:07 +01:00
Tom Herbers
3e2a53f1d0 gluon-status-page: swap bandwidth limits (#2304)
(cherry picked from commit 1cb0fc84fc)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
89ad149f93 gluon-status-page: fix display of non-string values from respondd data
Fixes the display of client counts, which are numbers and not strings
in the respondd data.

Fixes: 3a885a1b22 ("gluon-status-page: make "gateway nexthop" a link (#2278)")
(cherry picked from commit a357278464)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
b46e1839df gluon-status-page: use ubus to get radio channels
Do not depend on the respondd-airtime module just to get the configured
channels. This removes the display of the frequency in addition to the
channel, as it is not readily available.

In addition, the translation string is improved to allow for text after
the channel number.

(cherry picked from commit 0d3fa6b59b)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
cc20271cb8 gluon-status-page: avoid complex math
This code is usually running on an embedded CPU without FPU. In
addtition to its inefficience, the algorithm is also much harder to
understand.

Replace the logarithm formula with a simple loop.

(cherry picked from commit f2e0f7e3a8)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
b03e1e280e gluon-status-page: fix indentation
(cherry picked from commit dcb8738a5a)
2022-02-03 17:08:07 +01:00
lemoer
8af91d86c1 gluon-status-page: make "gateway nexthop" a link (#2278)
With this commit, the gateway nexthop is now a clickable link, that leads
to the status page of the nexthop.

(cherry picked from commit 3a885a1b22)
2022-02-03 17:08:07 +01:00
Martin Weinelt
8d51a72fe5 gluon-status-page: relax nodeinfo query timeout (#2262)
It was found that a one second timeout for nodeinfo data may be too low,
so that when a node is otherwise occupied that timeout may be reached
too often.

The nodeinfo query response is also vital to the status-page base
template, so that when it times out, the site will be turned in a broken
state, that it cannot recover from.

Fixes: #2256
(cherry picked from commit 76185e3a2a)
2022-02-03 17:08:07 +01:00
Matthias Schiffer
ef2d3578cf Makefile: error earlier when site.mk is missing
The site.mk target was only evaluated after the whole makefile was
parsed. This caused the GLUON_DEPRECATED error to be emitted first
(hiding the more helpful message that no site config was found) on Gluon
2021.1.x, where GLUON_DEPRECATED is used in a toplevel if in targets.mk.

By moving the check from recipe context to the toplevel, we ensure that
it is evaluated during parsing.

(cherry picked from commit 286d07b35f)
2022-02-03 17:08:07 +01:00
David Bauer
7e7dfceadc
modules: update OpenWrt (#2358)
81d0b4a9f4 kernel: bump 4.14 to 4.14.259
1d94f72439 kernel: bump 4.14 to 4.14.258
cc8c1be438 mac80211: Update to version 4.19.221
554f1b89aa iproute2: m_xt.so depends on dynsyms.list
f14bc5cf56 uboot-lantiq: danube: fix hanging lzma kernel uncompression #2
8fb714edd6 uboot-lantiq: danube: fix hanging lzma kernel uncompression
b5b526285a wireless-regdb: update to version 2021.08.28
a5c479a200 wireless-regdb: update to version 2021.04.21
b9f866825f tools/m4: update to 1.4.19
662fe6a6ee kernel: bump 4.14 to 4.14.254
5e8b9624f1 ar71xx: mikrotik: rb91x: fix 10M ethernet link speed
c72ea2a6c7 uboot-lantiq: fix sha1.h header clash when system libmd installed
93a48cb1a0 kernel: bump 4.14 to 4.14.248
123d12eada mac80211: Update to backports-4.19.207-1
31a2d41d64 sdk: fix missing include directories
556d165dda uboot-zynq: fix dtc compilation on host gcc 10
f33dc315cb uboot-tegra: Fix build with GCC-10 as host compiler
f31bb35b63 uboot-mvebu: Fix build with GCC-10 as host compiler
e8cf46ebba uboot-layerscape: fix dtc compilation on host gcc 10
d059ce28f5 uboot-kirkwood: Fix build with GCC-10 as host compiler
af5c8856f8 uboot-sunxi: Fix build with GCC-10 as host compiler

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-01-01 19:21:36 +01:00
David Bauer
2dad91bdcb
modules: fix respondd segfault (#2328)
* modules: use v2021.1.x Gluon package branch

* modules: update Gluon packages

015408e respondd-module-airtime: move const specifier to the right location
d068e7d respondd-module-airtime: remove incorrect fprintf argument
97981c2 respondd-module-airtime: remove PHY ID again
8dbd089 respondd-module-airtime: improve error handling

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-30 01:27:43 +02:00
Sven Eckelmann
d4cb17777b
ipq40xx: Fix automatic ipq-wifi selection for Plasma Cloud devices (#2314)
It was noticed that various devices had not the correct board-2.bin
installed. This was caused by a typo in the package name. The ath10k driver
(unfortunately) is then loading a completely unrelated BDF from the
ath10k-board-qca4019 board-2.bin. It is usually a rather bad idea to use
calibration data from a different board - but the effects depend on the
actual device.

For the PA1200, it was mostly noticed by the bad 2.4GHz performance.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-17 21:00:29 +02:00
David Bauer
0622764ed1 modules: update OpenWrt
9882a54c48 kernel: bump 4.14 to 4.14.245
fdea0036a2 openssl: bump to 1.1.1l
40c03b101c openssl: use --cross-compile-prefix in Configure

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-09-02 22:34:13 +02:00
David Bauer
8e679bb1f5 modules: update OpenWrt
9d082556fe kernel: bump to 4.14.244

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-24 19:49:07 +02:00
David Bauer
de8fbbdf6a openwrt: refresh patches 2021-08-14 19:56:29 +02:00
David Bauer
48d5e38c31 modules: update OpenWrt
7378c94927 kernel: bump to 4.14.243
cfc1602a1e OpenWrt v19.07.8: revert to branch defaults
31f2f76cd5 OpenWrt v19.07.8: adjust config defaults
ef56c85848 ubus: update to version 2021-07-01
796bf50e8e ubus: update to version 2021-06-03
92e341d632 ubus: backport SOVERSION support
e902d11de9 kernel: bump 4.14 to 4.14.241
ceb8821a3d ath10k-ct: add security fixes
71fa524e1b base-files: fix /tmp/TZ when zoneinfo not installed
c88bdb8294 base-files: fix zoneinfo support
15612706c9 mac80211: distance config: allow "auto" as a value
ec76c365c1 gitignore: add .ccache folder
bdd7faca8d kernel: bump 4.14 to 4.14.236

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-14 19:55:29 +02:00
David Bauer
0d2f834d31
Merge pull request #2285 from blocktrron/pr-v2021.1.1
docs: add Gluon v2021.1.1 release notes
2021-08-14 19:16:14 +02:00
David Bauer
a7331b5933
ath79-generic: add support for Joy-IT JT-OR750i (#2284) 2021-08-05 02:07:30 +02:00
David Bauer
aa173868ff README, docs: Gluon v2021.1.1 2021-08-01 17:20:47 +02:00
David Bauer
d7f9e17f3c docs: Add v2021.1.1 release notes
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-01 17:19:18 +02:00
David Bauer
cb7cec9214 modules: update Gluon packages
825aa0c respondd-module-airtime: fix null pointer deref

(cherry picked from commit 19381a235e)
2021-07-06 00:02:50 +02:00
Matthias Schiffer
7a395c1763 modules: update Gluon packages
64148a9baf14 lua-jsonc: add host build support
c2623391bf42 lua-jsonc: do not link against liblua

(cherry picked from commit 8a41d8d72d)
2021-07-06 00:02:38 +02:00
David Bauer
26483fae09 modules: update routing feed URL
The OpenWrt routing feed was moved to the OpenWrt GitHub org.

Update the URL, as the old one might not work in the future.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 3f8d12f55c)
2021-07-01 03:10:22 +02:00
Dark4MD
78bdd3b565 ramips-mt76x8: add Xiaomi Mi Router 4A (100M Edition)
(cherry picked from commit 0b00ed9193)
2021-06-22 12:07:00 +02:00
David Bauer
46191c30b8 gluon-mesh-vpn-core: fix two more missing NULL checks
read_stdout can return NULL and thus the return value need to be checked
prior to accessing it.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 344f8a47db)
2021-06-21 15:34:04 +02:00
David Bauer
bb1932c927 gluon-mesh-vpn-core: avoid reading null pointer
In case the limit_ingress or limit_egress options are not present in
gluon's mesh_vpn section the respondd provider compares a string literal
with a NULL pointer, crashing respondd.

Check both pointers prior to comparing them in order to mitigate this
issue.

Suggested-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 7e1e9fe2bd)
2021-06-21 15:33:56 +02:00
Matthias Schiffer
a50834f849 gluon-mesh-vpn-tunneldigger: fix Lua mesh-vpn provider module location
(cherry picked from commit f7e473edfa)
2021-06-21 15:33:44 +02:00
Martin Weinelt
0f9a6334a0 docs: expand on multicast improvements in v2021.1
I mixed up two separate improvements into one, this change aims to
clarify them based on a suggestion and conversation with @T-X.

(cherry picked from commit 05199e7e33)
2021-06-11 00:10:04 +02:00
48 changed files with 988 additions and 198 deletions

View File

@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: sudo apt install lua-check
run: sudo apt-get -y update && sudo apt-get -y install lua-check
- name: Install example site
run: ln -s ./docs/site-example ./site
- name: Lint Lua code
@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: sudo apt install shellcheck
run: sudo apt-get -y update && sudo apt-get -y install shellcheck
- name: Install example site
run: ln -s ./docs/site-example ./site
- name: Lint shell code

View File

@ -1,7 +1,7 @@
The code of Project Gluon may be distributed under the following terms, unless
noted otherwise in individual files or subtrees.
Copyright (c) 2013-2021, Project Gluon
Copyright (c) 2013-2022, Project Gluon
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -19,8 +19,9 @@ escape = '$(subst ','\'',$(1))'
GLUON_SITEDIR ?= site
$(eval $(call mkabspath,GLUON_SITEDIR))
$(GLUON_SITEDIR)/site.mk:
$(error No site configuration was found. Please check out a site configuration to $(GLUON_SITEDIR))
ifeq ($(realpath $(GLUON_SITEDIR)/site.mk),)
$(error No site configuration was found. Please check out a site configuration to $(GLUON_SITEDIR))
endif
include $(GLUON_SITEDIR)/site.mk
@ -176,6 +177,10 @@ config: $(LUA) FORCE
$(GLUON_ENV) $(LUA) scripts/target_config_check.lua
container: FORCE
@scripts/container.sh
all: config
+@
$(GLUON_ENV) $(LUA) scripts/clean_output.lua

View File

@ -21,7 +21,7 @@ the future development of Gluon.
Please refrain from using the `master` branch for anything else but development purposes!
Use the most recent release instead. You can list all releases by running `git tag`
and switch to one by running `git checkout v2021.1 && make update`.
and switch to one by running `git checkout v2021.1.2 && make update`.
If you're using the autoupdater, do not autoupdate nodes with anything but releases.
If you upgrade using random master commits the nodes *will break* eventually.

View File

@ -20,11 +20,11 @@
# -- Project information -----------------------------------------------------
project = 'Gluon'
copyright = '2015-2021, Project Gluon'
copyright = '2015-2022, Project Gluon'
author = 'Project Gluon'
# The short X.Y version
version = '2021.1'
version = '2021.1.2'
# The full version, including alpha/beta/rc tags
release = version

View File

@ -78,60 +78,7 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre
:caption: Releases
:maxdepth: 1
releases/v2021.1
releases/v2020.2.3
releases/v2020.2.2
releases/v2020.2.1
releases/v2020.2
releases/v2020.1.4
releases/v2020.1.3
releases/v2020.1.2
releases/v2020.1.1
releases/v2020.1
releases/v2019.1.3
releases/v2019.1.2
releases/v2019.1.1
releases/v2019.1
releases/v2018.2.4
releases/v2018.2.3
releases/v2018.2.2
releases/v2018.2.1
releases/v2018.2
releases/v2018.1.4
releases/v2018.1.3
releases/v2018.1.2
releases/v2018.1.1
releases/v2018.1
releases/v2017.1.8
releases/v2017.1.7
releases/v2017.1.6
releases/v2017.1.5
releases/v2017.1.4
releases/v2017.1.3
releases/v2017.1.2
releases/v2017.1.1
releases/v2017.1
releases/v2016.2.7
releases/v2016.2.6
releases/v2016.2.5
releases/v2016.2.4
releases/v2016.2.3
releases/v2016.2.2
releases/v2016.2.1
releases/v2016.2
releases/v2016.1.6
releases/v2016.1.5
releases/v2016.1.4
releases/v2016.1.3
releases/v2016.1.2
releases/v2016.1.1
releases/v2016.1
releases/v2015.1.2
releases/v2015.1.1
releases/v2015.1
releases/v2014.4
releases/v2014.3.1
releases/v2014.3
releases/index
License
-------

119
docs/releases/index.rst Normal file
View File

@ -0,0 +1,119 @@
Release Notes
=============
.. toctree::
:caption: Gluon 2021.1
:maxdepth: 2
v2021.1.2
v2021.1.1
v2021.1
.. toctree::
:caption: Gluon 2020.2
:maxdepth: 2
v2020.2.3
v2020.2.2
v2020.2.1
v2020.2
.. toctree::
:caption: Gluon 2020.1
:maxdepth: 2
v2020.1.4
v2020.1.3
v2020.1.2
v2020.1.1
v2020.1
.. toctree::
:caption: Gluon 2019.1
:maxdepth: 2
v2019.1.3
v2019.1.2
v2019.1.1
v2019.1
.. toctree::
:caption: Gluon 2018.2
:maxdepth: 2
v2018.2.4
v2018.2.3
v2018.2.2
v2018.2.1
v2018.2
.. toctree::
:caption: Gluon 2018.1
:maxdepth: 2
v2018.1.4
v2018.1.3
v2018.1.2
v2018.1.1
v2018.1
.. toctree::
:caption: Gluon 2017.1
:maxdepth: 2
v2017.1.8
v2017.1.7
v2017.1.6
v2017.1.5
v2017.1.4
v2017.1.3
v2017.1.2
v2017.1.1
v2017.1
.. toctree::
:caption: Gluon 2016.2
:maxdepth: 2
v2016.2.7
v2016.2.6
v2016.2.5
v2016.2.4
v2016.2.3
v2016.2.2
v2016.2.1
v2016.2
.. toctree::
:caption: Gluon 2016.1
:maxdepth: 2
v2016.1.6
v2016.1.5
v2016.1.4
v2016.1.3
v2016.1.2
v2016.1.1
v2016.1
.. toctree::
:caption: Gluon 2015.1
:maxdepth: 2
v2015.1.2
v2015.1.1
v2015.1
.. toctree::
:caption: Gluon 2014.4
:maxdepth: 2
v2014.4
.. toctree::
:caption: Gluon 2014.3
:maxdepth: 2
v2014.3.1
v2014.3

View File

@ -0,0 +1,63 @@
Gluon 2021.1.1
==============
Important notes
---------------
Upgrades to v2021.1 and later releases are only supported from releases v2018.2 and later. This is due to migrations that have been removed to simplify maintenance.
Added hardware support
----------------------
ath79-generic
~~~~~~~~~~~~~
* Joy-IT
- JT-OR750i
ramips-mt76x8
~~~~~~~~~~~~~
* Xiaomi
- Mi Router 4A (100M Edition)
Bugfixes
--------
- Missing bandwith limit settings resulted in a respondd crash for v2021.1.
- The Tunneldigger VPN provider was not registered with the Gluon VPN backend, resulting in broken Tunneldigger configurations.
- Disabling Radio interfaces in v2021.1 could lead to nullpointer dereferences in the respondd airtime module, as the survey returns no data in this case.
Known issues
------------
* Upgrading EdgeRouter-X from versions before v2020.1.x may lead to a soft-bricked state due to bad blocks on the NAND flash which the NAND driver before this release does not handle well.
(`#1937 <https://github.com/freifunk-gluon/gluon/issues/1937>`_)
* The integration of the BATMAN_V routing algorithm is incomplete.
- Mesh neighbors don't appear on the status page. (`#1726 <https://github.com/freifunk-gluon/gluon/issues/1726>`_)
Many tools have the BATMAN_IV metric hardcoded, these need to be updated to account for the new throughput
metric.
- Throughput values are not correctly acquired for different interface types.
(`#1728 <https://github.com/freifunk-gluon/gluon/issues/1728>`_)
This affects virtual interface types like bridges and VXLAN.
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown
(`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* In configurations without VXLAN, the MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled
(`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promiscuous mode is disallowed).

131
docs/releases/v2021.1.2.rst Normal file
View File

@ -0,0 +1,131 @@
Gluon 2021.1.2
==============
Important notes
---------------
This release fixes a **critical security vulnerability** in Gluon's
autoupdater.
Upgrades to v2021.1 and later releases are only supported from releases v2018.2
and later. Migration code for upgrades from older versions has been removed to
simplify maintenance.
Updates
-------
- The Linux kernel was updated to version 4.14.275
- The mac80211 wireless driver stack was updated to a version based on kernel
4.19.237
Various minor package updates are not listed here and can be found in the commit
log.
Bugfixes
--------
* **[SECURITY]** Autoupdater: Fix signature verification
A recently discovered issue (CVE-2022-24884) in the *ecdsautils* package
allows forgery of cryptographic signatures. This vulnerability can be
exploited to create a manifest accepted by the autoupdater without knowledge
of the signers' private keys. By intercepting nodes' connections to the update
server, such a manifest allows to distribute malicious firmware updates.
This is a **critical** vulnerability. All nodes with autoupdater must be
updated. Requiring multiple signatures for an update does *not* mitigate the
issue.
As a temporary workaround, the issue can be mitigated on individual nodes by
disabling the autoupdater via config mode or using the following commands::
uci set autoupdater.settings.enabled=0
uci commit autoupdater
A fixed firmware should be installed manually before enabling the autoupdater
again.
See security advisory `GHSA-qhcg-9ffp-78pw
<https://github.com/freifunk-gluon/ecdsautils/security/advisories/GHSA-qhcg-9ffp-78pw>`_
for further information on this vulnerability.
* **[SECURITY]** Config Mode: Prevent Cross-Site Request Forgery (CSRF)
The Config Mode was not validating the *Origin* header of POST requests.
This allowed arbitrary websites to modify configuration (including SSH keys)
on a Gluon node in Config Mode reachable from a user's browser by sending POST
requests with form data to 192.168.1.1.
The impact of this issue is considered low, as nodes are only vulnerable while
in Config Mode.
* Config Mode: Fix occasionally hanging page load after submitting the
configuration wizard causing the reboot message and VPN key not to be
displayed
* Config Mode (OSM): Update default OpenLayers source URL
The OSM feature of the Config Mode was broken when the default source URL was
used for OpenLayers, as the old URL has become unavailable. The default was
updated to a URL that should not become unavailable again.
* Config Mode (OSM): Fix error when using ``"`` character in attribution text
* respondd-module-airtime: Fix respondd crash on devices with disabled WLAN
interfaces
Several improvements were made to the error handling of the
*respondd-module-airtime* package. The "PHY ID" field (introduced in Gluon
2021.1) was removed again.
* ipq40xx: Fix bad WLAN performance on Plasma Cloud PA1200 and PA2200 devices
* Fix occasional build failure in "perl" package with high number of threads
(``-j32`` or higher)
Other improvements
------------------
* Several improvements were made to the status page:
- WLAN channel display does not require the *respondd-module-airtime* package
anymore
- The "gateway nexthop" label now links to the status page of the nexthop node
- The timeout to retrieve information from neighbour nodes was increased,
making the display of the name
of overloaded, slow or otherwise badly reachable nodes more likely to
succeed
Known issues
------------
* Upgrading EdgeRouter-X from versions before v2020.1.x may lead to a
soft-bricked state due to bad blocks on the NAND flash which the NAND driver
before this release does not handle well.
(`#1937 <https://github.com/freifunk-gluon/gluon/issues/1937>`_)
* The integration of the BATMAN_V routing algorithm is incomplete.
- Mesh neighbors don't appear on the status page.
(`#1726 <https://github.com/freifunk-gluon/gluon/issues/1726>`_)
Many tools have the BATMAN_IV metric hardcoded, these need to be updated to
account for the new throughput metric.
- Throughput values are not correctly acquired for different interface types.
(`#1728 <https://github.com/freifunk-gluon/gluon/issues/1728>`_)
This affects virtual interface types like bridges and VXLAN.
* Default TX power on many Ubiquiti devices is too high, correct offsets are
unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* In configurations without VXLAN, the MAC address of the WAN interface is
modified even when Mesh-on-WAN is disabled
(`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected
(like VMware when promiscuous mode is disallowed).

View File

@ -57,8 +57,9 @@ Major changes
Multicast optimizations (batman-adv)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In this release, we reenable the multicast optimizations, that have gone through another round of bug squashing upstream. This reduces layer 2 overhead, especially for IPv6 neighbor discovery, because multicast traffic will be converted to unicast traffic when the number of subscribers does not exceed 16. This is beneficial as we would previously drop multicast traffic that wasn't explicitly allowed but now can allow multicast traffic if it wouldn't result in broadcast.
In this release, we reenable the multicast optimizations, that have gone through another round of bug squashing upstream. With this feature batman-adv will distribute IPv6 link-local multicast packets via individual unicast packets instead of flooding them through the whole mesh as long as the number of subscribed nodes does not exceed 16. This reduces layer 2 overhead, especially for IPv6 Neighbor Discovery.
We also relaxed the firewall for IPv6 multicast packets: Instead of always dropping non-essential multicast packets we now allow all IPv6 link-local multicast packets to pass when the destination group has up to 16 subscribers
Status page
~~~~~~~~~~~

View File

@ -1,4 +1,4 @@
-- This is an example site configuration for Gluon v2021.1
-- This is an example site configuration for Gluon v2021.1.2
--
-- Take a look at the documentation located at
-- https://gluon.readthedocs.io/ for details.

View File

@ -8,7 +8,7 @@ Gluon's releases are managed using `Git tags`_. If you are just getting
started with Gluon we recommend to use the latest stable release of Gluon.
Take a look at the `list of gluon releases`_ and notice the latest release,
e.g. *v2021.1*. Always get Gluon using git and don't try to download it
e.g. *v2021.1.2*. Always get Gluon using git and don't try to download it
as a Zip archive as the archive will be missing version information.
Please keep in mind that there is no "default Gluon" build; a site configuration
@ -40,11 +40,17 @@ freshly installed Debian Stretch system the following packages are required:
* `time` (built-in `time` doesn't work)
We also provide a container environment that already tracks all these dependencies. It quickly gets you up and running, if you already have either Docker or Podman installed locally.
::
./scripts/container.sh
Building the images
-------------------
To build Gluon, first check out the repository. Replace *RELEASE* with the
version you'd like to checkout, e.g. *v2021.1*.
version you'd like to checkout, e.g. *v2021.1.2*.
::

View File

@ -478,7 +478,7 @@ config_mode \: optional
*openlayers_url* allows to override the base URL of the
*build/ol.js* and *css/ol.css* files (the default is
``https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.2.0``).
``https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@35ffe7626ce16c372143f3c903950750075e7068/en/v5.3.0``).
It is also possible to replace the default tile layer (which is OpenStreetMap)
with a custom one using the *tile_layer* section. Only XYZ layers are supported
at this point.

View File

@ -405,6 +405,10 @@ ramips-mt76x8
- VoCore2
* Xiaomi
- Xiaomi Mi Router 4A (100M Edition)
ramips-rt305x [#deprecated]_ [#device-class-tiny]_
---------------------------------------------------

11
modules
View File

@ -2,15 +2,16 @@ GLUON_FEEDS='packages routing gluon'
OPENWRT_REPO=https://github.com/openwrt/openwrt.git
OPENWRT_BRANCH=openwrt-19.07
OPENWRT_COMMIT=ffd4452f8b241d1d5b5ea8a56206f51702bbd6c5
OPENWRT_COMMIT=83b0e20711ee4a927634b3c2a018c93527e84a2b
PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git
PACKAGES_PACKAGES_BRANCH=openwrt-19.07
PACKAGES_PACKAGES_COMMIT=476b8b82bb7447a1ed847c96d85de567e09cdb62
PACKAGES_PACKAGES_COMMIT=1c5e4c80f49bfddaee1998636fd8efe915fee7fc
PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git
PACKAGES_ROUTING_BRANCH=openwrt-19.07
PACKAGES_ROUTING_COMMIT=101632e153b41238bc19dfd96ba2d23339dbcb76
PACKAGES_ROUTING_COMMIT=8f23999365de1bf2617e03d3f536e4542258d985
PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=8d53ff54e562ddb2ed8397781dd78edc76f6ff38
PACKAGES_GLUON_BRANCH=v2021.1.x
PACKAGES_GLUON_COMMIT=f9ef3fc7d9d7b270de893e80cf6fba916c06bf45

View File

@ -22,7 +22,7 @@ function f:write()
uci:set("gluon-setup-mode", uci:get_first("gluon-setup-mode", "setup_mode"), "configured", true)
uci:save("gluon-setup-mode")
os.execute('gluon-reconfigure')
os.execute('exec gluon-reconfigure >/dev/null')
f.template = "wizard/reboot"
f.package = "gluon-config-mode-core"

View File

@ -130,6 +130,9 @@ local primary_addrs = {
'tplink,c2-v1',
'ex3700'
}},
{'ramips', 'mt76x8', {
'xiaomi,mir4a-100m',
}},
{'x86'},
}},
{interface('wan'), {

View File

@ -60,11 +60,11 @@ static struct json_object * get_bandwidth_limit(void) {
enabled = true;
const char *egress_str = uci_lookup_option_string(ctx, s, "limit_egress");
if (strcmp(egress_str, "-"))
if (egress_str && strcmp(egress_str, "-"))
egress = atoi(egress_str);
const char *ingress_str = uci_lookup_option_string(ctx, s, "limit_ingress");
if (strcmp(ingress_str, "-"))
if (ingress_str && strcmp(ingress_str, "-"))
ingress = atoi(ingress_str);
if (egress >= 0)
@ -110,6 +110,9 @@ static struct json_object * get_mesh_vpn_enabled() {
int enabled = -1;
char *line = read_stdout("exec lua -e 'print(require(\"gluon.mesh-vpn\").enabled())'");
if (!line)
return NULL;
if (!strcmp(line, "true"))
enabled = 1;
if (!strcmp(line, "false"))
@ -126,7 +129,7 @@ static struct json_object * get_mesh_vpn_enabled() {
static struct json_object * get_active_vpn_provider() {
char *line = read_stdout("exec lua -e 'name, _ = require(\"gluon.mesh-vpn\").get_active_provider(); print(name)'");
if (!strcmp(line, "nil")) {
if (line && !strcmp(line, "nil")) {
free(line);
return NULL;
}

View File

@ -65,7 +65,7 @@ static struct json_object * get_fastd_version(void) {
}
const char *version = line;
if (strncmp(version, "fastd ", 6) == 0)
if (version && strncmp(version, "fastd ", 6) == 0)
version += 6;
struct json_object *ret = gluonutil_wrap_string(version);

View File

@ -69,8 +69,23 @@ void tv_subtract (struct timeval *r, const struct timeval *a, const struct timev
}
}
ssize_t recvtimeout(int socket, void *buffer, size_t length, int flags, const struct timeval *timeout) {
void resize_recvbuffer(char **recvbuffer, size_t *recvbuffer_len, size_t recvlen)
{
free(*recvbuffer);
*recvbuffer = malloc(recvlen);
if (!(*recvbuffer)) {
perror("Could not resize recvbuffer");
exit(EXIT_FAILURE);
}
*recvbuffer_len = recvlen;
}
ssize_t recvtimeout(int socket, char **recvbuffer, size_t *recvbuffer_len,
const struct timeval *timeout) {
struct timeval now, timeout_left;
ssize_t recvlen;
getclock(&now);
tv_subtract(&timeout_left, timeout, &now);
@ -79,18 +94,28 @@ ssize_t recvtimeout(int socket, void *buffer, size_t length, int flags, const st
return -1;
setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, &timeout_left, sizeof(timeout_left));
return recv(socket, buffer, length, flags);
recvlen = recv(socket, NULL, 0, MSG_PEEK | MSG_TRUNC);
if (recvlen < 0)
return recvlen;
if (recvlen > *recvbuffer_len)
resize_recvbuffer(recvbuffer, recvbuffer_len, recvlen);
return recv(socket, *recvbuffer, *recvbuffer_len, 0);
}
int request(const int sock, const struct sockaddr_in6 *client_addr, const char *request, const char *sse, double timeout, unsigned int max_count) {
int request(const int sock, char **recvbuffer, size_t *recvbuffer_len,
const struct sockaddr_in6 *client_addr, const char *request,
const char *sse, double timeout, unsigned int max_count) {
ssize_t ret;
char buffer[8192];
unsigned int count = 0;
ret = sendto(sock, request, strlen(request), 0, (struct sockaddr *)client_addr, sizeof(struct sockaddr_in6));
if (ret < 0) {
perror("Error in sendto()");
free(*recvbuffer);
exit(EXIT_FAILURE);
}
@ -105,7 +130,7 @@ int request(const int sock, const struct sockaddr_in6 *client_addr, const char *
}
do {
ret = recvtimeout(sock, buffer, sizeof(buffer), 0, &tv_timeout);
ret = recvtimeout(sock, recvbuffer, recvbuffer_len, &tv_timeout);
if (ret < 0)
break;
@ -116,7 +141,7 @@ int request(const int sock, const struct sockaddr_in6 *client_addr, const char *
fputs("data: ", stdout);
}
fwrite(buffer, sizeof(char), ret, stdout);
fwrite(*recvbuffer, sizeof(char), ret, stdout);
if (sse)
fputs("\n\n", stdout);
@ -137,6 +162,8 @@ int main(int argc, char **argv) {
int sock;
struct sockaddr_in6 client_addr = {};
char *request_string = NULL;
char *recvbuffer = NULL;
size_t recvbuffer_len = 0;
sock = socket(PF_INET6, SOCK_DGRAM, 0);
@ -243,11 +270,13 @@ int main(int argc, char **argv) {
}
do {
ret = request(sock, &client_addr, request_string, sse, timeout, max_count);
ret = request(sock, &recvbuffer, &recvbuffer_len, &client_addr,
request_string, sse, timeout, max_count);
} while(loop);
if (sse)
fputs("event: eot\ndata: null\n\n", stdout);
free(recvbuffer);
return ret;
}

View File

@ -1,7 +1,11 @@
<%-
local iwinfo = require 'iwinfo'
local ubus = require 'ubus'
local unistd = require 'posix.unistd'
local util = require 'gluon.util'
local wireless = require 'gluon.wireless'
local uci = require('simple-uci').cursor()
local translations = {}
local site_i18n = i18n 'gluon-site'
@ -29,17 +33,31 @@
local mesh = get_mesh()
local function get_interfaces()
local uconn = ubus.connect()
if not uconn then
error('failed to connect to ubus')
end
local function get_interfaces(uconn)
local interfaces = util.get_mesh_devices(uconn)
ubus.close(uconn)
table.sort(interfaces)
return interfaces
end
local function get_radios()
local ret = {}
wireless.foreach_radio(uci, function(radio)
local channel = iwinfo.nl80211.channel(wireless.find_phy(radio))
if channel then
table.insert(ret, {
name = radio['.name'],
channel = channel,
})
end
end)
table.sort(ret, function(a, b)
return a.name < b.name
end)
return ret
end
local function is_wireless(iface)
while true do
local pattern = '/sys/class/net/' .. iface .. '/lower_*'
@ -52,7 +70,16 @@
return unistd.access('/sys/class/net/' .. iface .. '/wireless') ~= nil
end
local interfaces = get_interfaces()
local uconn = ubus.connect()
if not uconn then
error('failed to connect to ubus')
end
local interfaces = get_interfaces(uconn)
ubus.close(uconn)
local radios = get_radios()
local function sorted(t)
t = {unpack(t)}
@ -66,12 +93,17 @@
local function formatBits(bits)
local units = {[0]='', 'k', 'M', 'G'}
local unit = 0
local pow = math.floor(math.log(math.max(math.abs(bits), 1)) / math.log(1000))
local known_pow = math.min(pow, #units)
for i = 1, #units do
if math.abs(bits) < 1000 then
break
end
unit = i
bits = bits / 1000
end
local significand = bits/(1000^known_pow)
return string.format('%g %sbit', significand, units[known_pow])
return string.format('%g %sbit', bits, units[unit])
end
local function statistics(key, format)
@ -135,11 +167,11 @@
<% if nodeinfo.network.mesh_vpn.bandwidth_limit.enabled then -%>
<dt><%:Bandwidth limit%></dt>
<dd>
<% if nodeinfo.network.mesh_vpn.bandwidth_limit.egress then -%>
<%| formatBits(nodeinfo.network.mesh_vpn.bandwidth_limit.egress*1000) %>/s <%:upstream%><br />
<%- end %>
<% if nodeinfo.network.mesh_vpn.bandwidth_limit.ingress then -%>
<%| formatBits(nodeinfo.network.mesh_vpn.bandwidth_limit.ingress*1000) %>/s <%:downstream%>
<%| formatBits(nodeinfo.network.mesh_vpn.bandwidth_limit.ingress*1000) %>/s <%:downstream%><br />
<%- end %>
<% if nodeinfo.network.mesh_vpn.bandwidth_limit.egress then -%>
<%| formatBits(nodeinfo.network.mesh_vpn.bandwidth_limit.egress*1000) %>/s <%:upstream%>
<%- end %>
</dd>
<%- end %>
@ -190,11 +222,17 @@
<tr><th><%:Wireless 2.4 GHz%></th><td><%= statistics('clients/wifi24') %></td></tr>
<tr><th><%:Wireless 5 GHz%></th><td><%= statistics('clients/wifi5') %></td></tr>
</table>
<div id="radios" style="display: none">
<% if radios[1] then -%>
<h3><%:Radios%></h3>
<table id="radio-devices">
<table>
<% for _, radio in ipairs(radios) do -%>
<tr>
<th><%| radio.name %></th>
<td><%| translatef('Channel %u', radio.channel) %></td>
</tr>
<%- end %>
</table>
</div>
<%- end %>
<h3><%:Traffic%></h3>
<table>

File diff suppressed because one or more lines are too long

View File

@ -31,8 +31,8 @@ msgstr "Automatische Updates"
msgid "Bandwidth limit"
msgstr "Bandbreitenlimit"
msgid "Channel"
msgstr "Kanal"
msgid "Channel %u"
msgstr "Kanal %u"
msgid "Clients"
msgstr "Clients"

View File

@ -22,7 +22,7 @@ msgstr ""
msgid "Bandwidth limit"
msgstr ""
msgid "Channel"
msgid "Channel %u"
msgstr ""
msgid "Clients"

View File

@ -121,7 +121,15 @@
var neigh = iface.lookup_neigh(addr);
if (!neigh)
continue;
return 'via ' + neigh.get_hostname() + ' (' + i + ')';
var span = document.createElement('span');
span.appendChild(document.createTextNode('via '));
var a = document.createElement('a');
a.href = 'http://[' + neigh.get_addr() + ']/';
a.textContent = neigh.get_hostname();
span.appendChild(a);
span.appendChild(document.createTextNode(' (' + i + ')'));
return span;
}
return 'via ' + addr + ' (unknown iface)';
@ -208,50 +216,6 @@
});
}
function update_radios(wireless) {
function channel(frequency) {
if (frequency===2484)
return 14
if (2412<=frequency && frequency<=2472)
return (frequency-2407)/5
if (5160<=frequency && frequency<=5885)
return (frequency-5000)/5
return 'unknown'
}
var div = document.getElementById('radios');
if (!wireless) {
div.style.display = 'none';
return;
}
div.style.display = '';
var table = document.getElementById('radio-devices');
while (table.lastChild)
table.removeChild(table.lastChild);
wireless.sort(function (a, b) {
return a.phy - b.phy;
});
wireless.forEach(function (radio) {
var tr = document.createElement('tr');
var th = document.createElement('th');
th.textContent = "phy" + radio.phy;
tr.appendChild(th);
var td = document.createElement('td');
td.innerHTML = radio.frequency + " MHz<br />Channel " + channel(radio.frequency);
tr.appendChild(td);
table.appendChild(tr);
});
}
var statisticsElems = document.querySelectorAll('[data-statistics]');
add_event_source('/cgi-bin/dyn/statistics', function(data, dataPrev) {
@ -264,9 +228,16 @@
var valuePrev = resolve_key(dataPrev, stat);
var value = resolve_key(data, stat);
try {
var text = formats[format](value, valuePrev, diff);
if (text !== undefined)
elem.textContent = text;
var format_result = formats[format](value, valuePrev, diff);
switch (typeof format_result) {
case "object":
if (elem.lastChild)
elem.removeChild(elem.lastChild);
elem.appendChild(format_result);
break;
default:
elem.textContent = format_result;
}
} catch (e) {
console.error(e);
}
@ -277,11 +248,6 @@
} catch (e) {
console.error(e);
}
try {
update_radios(data.wireless);
} catch (e) {
console.error(e);
}
})
function haversine(lat1, lon1, lat2, lon2) {
@ -319,7 +285,7 @@
'resize': function(w, h) {
var lastImage;
try {
ctx.getImageData(0, 0, w, h);
lastImage = ctx.getImageData(0, 0, w, h);
} catch (e) {}
canvas.width = w;
canvas.height = h;
@ -492,6 +458,7 @@
}
var hostname = document.createElement("span");
var addr;
hostname.textContent = addr;
tdHostname.appendChild(hostname);
@ -552,13 +519,13 @@
el.classList.add("highlight");
if (signal)
signal.highlight = true;
}
};
el.onmouseleave = function () {
el.classList.remove("highlight")
el.classList.remove("highlight");
if (signal)
signal.highlight = false;
}
};
var timeout;
@ -586,7 +553,8 @@
var n = parts.length;
var groups = [];
parts.forEach(function(part, i) {
for (var i = 0; i < parts.length; i++) {
var part = parts[i];
if (part === '') {
while (n++ <= 8)
groups.push(0);
@ -596,7 +564,7 @@
groups.push(parseInt(part, 16));
}
});
};
return groups;
}
@ -664,8 +632,11 @@
'get_hostname': function() {
return hostname.textContent;
},
'get_addr': function() {
return addr;
},
'update_nodeinfo': function(nodeinfo) {
var addr = choose_address(nodeinfo.network.addresses);
addr = choose_address(nodeinfo.network.addresses);
if (addr) {
if (hostname.nodeName.toLowerCase() === 'span') {
var oldHostname = hostname;

View File

@ -61,7 +61,7 @@ local function match(a, b, n)
end
entry({}, call(function(http, renderer)
local nodeinfo = json.parse(util.exec('exec gluon-neighbour-info -d ::1 -p 1001 -t 1 -c 1 -r nodeinfo'))
local nodeinfo = json.parse(util.exec('exec gluon-neighbour-info -d ::1 -p 1001 -t 3 -c 1 -r nodeinfo'))
local node_ip = parse_ip(http:getenv('SERVER_ADDR'))
if node_ip and (

View File

@ -44,7 +44,6 @@ $Id$
<div class="gluon-page-actions">
<input type="hidden" name="step" value="2" />
<input type="hidden" name="token" value="<%=token%>" />
<input class="gluon-button gluon-button-submit" type="submit" value="<%:Upload image%>" />
</div>
</form>

View File

@ -49,13 +49,11 @@ You may obtain a copy of the License at
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>" style="display:inline">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
<input type="hidden" name="token" value="<%=token%>" />
<input class="gluon-button gluon-button-submit" type="submit" value="<%:Continue%>" />
</form>
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>" style="display:inline">
<input type="hidden" name="step" value="1" />
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
<input type="hidden" name="token" value="<%=token%>" />
<input class="gluon-button gluon-button-reset" type="submit" value="<%:Cancel%>" />
</form>
</div>

View File

@ -1,5 +1,4 @@
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>" data-update="reset">
<input type="hidden" name="token" value="<%=token%>" />
<input type="hidden" name="<%=id%>" value="1" />
<div class="gluon-form" id="form-<%=id%>">

View File

@ -1,6 +1,7 @@
<div id="<%=id%>" class="gluon-osm-map" style="display: none"></div>
<script type="text/javascript" src="/static/gluon-web-osm.js"></script>
<script type="text/javascript">
//<![CDATA[
(function() {
var elMap = document.getElementById(<%=json(id)%>);
var wrapper = elMap.parentNode;
@ -41,4 +42,5 @@
});
});
})();
//]]>
</script>

View File

@ -4,7 +4,8 @@ local util = require "gluon.web.util"
local class = util.class
local DEFAULT_URL = 'https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.2.0'
local DEFAULT_URL =
'https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@35ffe7626ce16c372143f3c903950750075e7068/en/v5.3.0'
local M = {}

View File

@ -184,9 +184,15 @@ local function dispatch(config, http, request)
return
end
http:parse_input(node.filehandler)
local ok, err = pcall(http.parse_input, http, node.filehandler)
if not ok then
http:status(400, "Bad request")
http:prepare_content("text/plain")
http:write(err .. "\r\n")
return
end
local ok, err = pcall(node.target)
ok, err = pcall(node.target)
if not ok then
http:status(500, "Internal Server Error")
renderer.render_layout("error/500", {
@ -208,6 +214,6 @@ return function(config, http)
if not ok then
http:status(500, "Internal Server Error")
http:prepare_content("text/plain")
http:write(err)
http:write(err .. "\r\n")
end
end

View File

@ -108,16 +108,11 @@ end
-- o String value containing a chunk of the file data
-- o Boolean which indicates whether the current chunk is the last one (eof)
local function mimedecode_message_body(src, msg, filecb)
if msg and msg.env.CONTENT_TYPE then
msg.mime_boundary = msg.env.CONTENT_TYPE:match("^multipart/form%-data; boundary=(.+)$")
local mime_boundary = (msg.env.CONTENT_TYPE or ''):match("^multipart/form%-data; boundary=(.+)$")
if not mime_boundary then
error("Invalid Content-Type found")
end
if not msg.mime_boundary then
return nil, "Invalid Content-Type found"
end
local tlen = 0
local inhdr = false
local field = nil
@ -188,10 +183,10 @@ local function mimedecode_message_body(src, msg, filecb)
local spos, epos, found
repeat
spos, epos = data:find("\r\n--" .. msg.mime_boundary .. "\r\n", 1, true)
spos, epos = data:find("\r\n--" .. mime_boundary .. "\r\n", 1, true)
if not spos then
spos, epos = data:find("\r\n--" .. msg.mime_boundary .. "--\r\n", 1, true)
spos, epos = data:find("\r\n--" .. mime_boundary .. "--\r\n", 1, true)
end
@ -250,20 +245,61 @@ local function mimedecode_message_body(src, msg, filecb)
return true
end
return pump(src, snk)
assert(pump(src, snk))
end
local function check_post_origin(msg)
local default_port = '80'
local request_scheme = 'http'
if msg.env.HTTPS then
default_port = '443'
request_scheme = 'https'
end
local request_host = msg.env.HTTP_HOST
if not request_host then
error('POST request without Host header')
end
if not request_host:match(':[0-9]+$') then
request_host = request_host .. ':' .. default_port
end
local origin = msg.env.HTTP_ORIGIN
if not origin then
error('POST request without Origin header')
end
local origin_scheme, origin_host = origin:match('^([^:]*)://(.*)$')
if not origin_host then
error('POST request with invalid Origin header')
end
if not origin_host:match(':[0-9]+$') then
local origin_port
if origin_scheme == 'http' then
origin_port = '80'
elseif origin_scheme == 'https' then
origin_port = '443'
else
error('POST request with invalid Origin header')
end
origin_host = origin_host .. ':' .. origin_port
end
if request_scheme ~= origin_scheme or request_host ~= origin_host then
error('Invalid cross-origin POST')
end
end
-- This function will examine the Content-Type within the given message object
-- to select the appropriate content decoder.
-- Currently only the multipart/form-data mime type is supported.
function M.parse_message_body(src, msg, filecb)
if not (msg.env.REQUEST_METHOD == "POST" and msg.env.CONTENT_TYPE) then
if msg.env.REQUEST_METHOD ~= "POST" then
return
end
if msg.env.CONTENT_TYPE:match("^multipart/form%-data") then
return mimedecode_message_body(src, msg, filecb)
end
check_post_origin(msg)
mimedecode_message_body(src, msg, filecb)
end
return M

View File

@ -13,10 +13,10 @@ circumvent this issue.
Signed-off-by: David Bauer <mail@david-bauer.net>
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 36aebbb2ccfec2137d5d260fe2111d77f531ddec..367a3e8e37a8e8435c35ca2912ef0855efbdfc78 100644
index bb48ab9a15e470b6807693e08fdc84fb3c94aeed..272fb2a726bb34fa3ab74dfe48150197dbf918ca 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -100,6 +100,9 @@ mac80211_hostapd_setup_base() {
@@ -101,6 +101,9 @@ mac80211_hostapd_setup_base() {
json_get_vars noscan ht_coex
json_get_values ht_capab_list ht_capab tx_burst

View File

@ -1954,10 +1954,10 @@ index 0000000000000000000000000000000000000000..92bb9275df9d54778ce8f00b1cb6e999
+2.27.0
+
diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index d54ede9efda0a3ffd84e9a0c49dc410a01737d82..15b50523bf55d9a77fc1655ec6ba6ffde6d93a3e 100644
index a0569e4eb0e1249880864563ee980fadcbcc4ac6..c672ee6ff8e7540920c48be9f0a45ed73e428c1b 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -628,6 +628,7 @@ CONFIG_BRIDGE=y
@@ -630,6 +630,7 @@ CONFIG_BRIDGE=y
# CONFIG_BRIDGE_EBT_T_NAT is not set
# CONFIG_BRIDGE_EBT_VLAN is not set
CONFIG_BRIDGE_IGMP_SNOOPING=y

View File

@ -429,7 +429,7 @@ index 0000000000000000000000000000000000000000..bcb9552ce777d1d522c7642649e22ec2
+ qcom,ath10k-calibration-variant = "PlasmaCloud-PA1200";
+};
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index 68dcbc59a42f6d8360b87c7b4e74cd34f697b465..e14d00ad08b8caf2dae935d573f0ba7bb0433c23 100644
index 68dcbc59a42f6d8360b87c7b4e74cd34f697b465..3a2e7a4410afcba1a1369cac328e237fc350668b 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -345,6 +345,21 @@ endef
@ -447,7 +447,7 @@ index 68dcbc59a42f6d8360b87c7b4e74cd34f697b465..e14d00ad08b8caf2dae935d573f0ba7b
+ IMAGES = factory.bin sysupgrade.bin
+ IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
+ IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
+ DEVICE_PACKAGES := uboot-envtools ipq-wifi-plasmacloud-pa1200
+ DEVICE_PACKAGES := uboot-envtools ipq-wifi-plasmacloud_pa1200
+endef
+TARGET_DEVICES += plasmacloud_pa1200
+

View File

@ -501,7 +501,7 @@ index 0000000000000000000000000000000000000000..2d0655114b4e0749e0c878a3d16ece2a
+ ieee80211-freq-limit = <5470000 5875000>;
+};
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index e14d00ad08b8caf2dae935d573f0ba7bb0433c23..9872d0c4abcbb9d607bb15c47f0f820e7cdea077 100644
index 3a2e7a4410afcba1a1369cac328e237fc350668b..b6241d622574657b5261a45507ba5959d39eaa67 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -360,6 +360,21 @@ define Device/plasmacloud_pa1200
@ -519,7 +519,7 @@ index e14d00ad08b8caf2dae935d573f0ba7bb0433c23..9872d0c4abcbb9d607bb15c47f0f820e
+ IMAGES = factory.bin sysupgrade.bin
+ IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
+ IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
+ DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud-pa2200 uboot-envtools
+ DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud_pa2200 uboot-envtools
+endef
+TARGET_DEVICES += plasmacloud_pa2200
+

View File

@ -0,0 +1,220 @@
From: Vincent Wiemann <vincent.wiemann@ironai.com>
Date: Sun, 20 Jun 2021 16:56:21 +0200
Subject: ath79: add support for Joy-IT JT-OR750i
Specifications:
* QCA9531, 16 MiB flash (Winbond W25Q128JVSQ), 128 MiB RAM
* 802.11n 2T2R (external antennas)
* QCA9887, 802.11ac 1T1R (connected with diplexer to one of the antennas)
* 3x 10/100 LAN, 1x 10/100 WAN
* UART header with pinout printed on PCB
Installation:
* The device comes with a bootloader installed only
* The bootloader offers DHCP and is reachable at http://10.123.123.1
* Accept the agreement and flash sysupgrade.bin
* Use Firefox if flashing does not work
TFTP recovery with static IP:
* Rename sysupgrade.bin to jt-or750i_firmware.bin
* Offer it via TFTP server at 192.168.0.66
* Keep the reset button pressed for 4 seconds after connecting power
TFTP recovery with dynamic IP:
* Rename sysupgrade.bin to jt-or750i_firmware.bin
* Offer it via TFTP server with a DHCP server running at the same address
* Keep the reset button pressed for 6 seconds after connecting power
Co-authored-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
(cherry picked from commit 55b4b3655263984b92e4b9fc515a5e6b8003c655)
diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds
index dd0f91affa3cd9a731343a816bc666e0bbd44e99..ba8dcd430304a284296861b9e0694be42c68fe44 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -84,6 +84,9 @@ glinet,gl-ar300m-lite)
glinet,gl-x750)
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
;;
+joyit,jt-or750i)
+ ucidef_set_led_default "ath10k" "ath10k-disable" "ath10k-phy0" "0"
+ ;;
netgear,wnr612-v2|\
on,n150r)
ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
index 57429fbc1c851b6d8a8a03096d7043f78a489549..fba5d68eafff37bcedeb734a4d524cfb338d00fa 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -171,6 +171,11 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
+ joyit,jt-or750i)
+ ucidef_set_interface_wan "eth1"
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
+ ;;
librerouter,librerouter-v1)
ucidef_add_switch "switch0" \
"0@eth0" "5:wan" "6@eth1" "4:lan"
diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index c917f38211d0b246f064dba4b7feefecf61f5856..39205de2ec2ecd4d67a560dccfad36aab7a0aa0b 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -100,7 +100,8 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
;;
- elecom,wrc-1750ghbk2-i)
+ elecom,wrc-1750ghbk2-i|\
+ joyit,jt-or750i)
ath10kcal_extract "art" 20480 2116
;;
engenius,ecb1750)
diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
new file mode 100644
index 0000000000000000000000000000000000000000..8a4d4c682380b26aa2437b26391273ddc7bf2d75
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -0,0 +1,120 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "qca953x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "joyit,jt-or750i", "qca,qca9531";
+ model = "Joy-IT JT-OR750i";
+
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_red;
+ label-mac-device = &eth0;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_green: status_green {
+ label = "green:status";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&pinmux {
+ pinmux_led_eth_pins: pinmux_led_eth_pins {
+ pinctrl-single,bits = \
+ /* GPIO 4: LED_LINK_5 (WAN) */ \
+ <0x04 0x0000002d 0x000000ff>, \
+ /* GPIO 14: LED_LINK_2 (LAN 3) */ \
+ /* GPIO 15: LED_LINK_3 (LAN 2) */ \
+ <0x0c 0x2b2c0000 0xffff0000>, \
+ /* GPIO 16: LED_LINK_4 (LAN 1) */ \
+ <0x10 0x0000002a 0x000000ff>;
+ };
+};
+
+&spi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x40000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "u-boot-env";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xfa0000>;
+ compatible = "denx,uimage";
+ };
+
+ art: partition@ff0000 {
+ label = "art";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&eth0 {
+ status = "okay";
+
+ phy-handle = <&swphy4>;
+
+ mtd-mac-address = <&art 0x0>;
+};
+
+&eth1 {
+ mtd-mac-address = <&art 0x6>;
+};
+
+&pcie0 {
+ status = "okay";
+};
+
+&wmac {
+ status = "okay";
+
+ mtd-cal-data = <&art 0x1000>;
+};
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 7159f9c6d2dabf0a80b4a107790471da32af97bc..080be91fe1351b45a68057de71e5cd1464773f11 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -484,6 +484,14 @@ define Device/jjplus_ja76pf2
endef
TARGET_DEVICES += jjplus_ja76pf2
+define Device/joyit_jt-or750i
+ ATH_SOC := qca9531
+ DEVICE_TITLE := Joy-IT JT-OR750i
+ DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
+ IMAGE_SIZE := 16000k
+endef
+TARGET_DEVICES += joyit_jt-or750i
+
define Device/librerouter_librerouter-v1
ATH_SOC := qca9558
DEVICE_TITLE := LibreRouter v1

View File

@ -0,0 +1,24 @@
From: David Bauer <mail@david-bauer.net>
Date: Wed, 28 Jul 2021 13:52:22 +0200
Subject: ath79: enable missing pinmux for JT-OR750i
Without explicit configuration of these pins the ethernet as well as
status LED of the device do not work correctly.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 4feb9a4211d4c8e118e6b8f01fa0bbd4eab5d35c)
diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
index 8a4d4c682380b26aa2437b26391273ddc7bf2d75..d87daddd771325a8788b59edf2159c3be7bedf07 100644
--- a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -31,6 +31,9 @@
leds {
compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&jtag_disable_pins &pinmux_led_eth_pins>;
+
led_status_green: status_green {
label = "green:status";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;

View File

@ -0,0 +1,26 @@
From: David Bauer <mail@david-bauer.net>
Date: Wed, 28 Jul 2021 14:17:13 +0200
Subject: ath79: fix JT-OR750i switch LED assignment
The LEDs for LAN1 and LAN3 were swapped. Link on port 1 would illuminate
the LED on port 3 and vice versa.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit f0a885ed8636b9762d12f2eb2755f63297ff0cb5)
diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
index d87daddd771325a8788b59edf2159c3be7bedf07..60fa922878355ebdaf7d2983fe926efdf8b97207 100644
--- a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -54,9 +54,9 @@
<0x04 0x0000002d 0x000000ff>, \
/* GPIO 14: LED_LINK_2 (LAN 3) */ \
/* GPIO 15: LED_LINK_3 (LAN 2) */ \
- <0x0c 0x2b2c0000 0xffff0000>, \
+ <0x0c 0x2b2a0000 0xffff0000>, \
/* GPIO 16: LED_LINK_4 (LAN 1) */ \
- <0x10 0x0000002a 0x000000ff>;
+ <0x10 0x0000002c 0x000000ff>;
};
};

View File

@ -0,0 +1,21 @@
From: Nico Boehr <freifunk@nicoboehr.de>
Date: Sat, 7 May 2022 08:39:05 +0200
Subject: ath79: Joy-IT OR750i: fix UART
The serial console defaults to disabled in the DTSI files, explicitly
enable it for the Joy-IT OR750i, so we can get a console in linux.
Signed-off-by: Nico Boehr <freifunk@nicoboehr.de>
diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
index 60fa922878355ebdaf7d2983fe926efdf8b97207..042348d82c479c097f534f0bf2bb383ace55e02d 100644
--- a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -121,3 +121,7 @@
mtd-cal-data = <&art 0x1000>;
};
+
+&uart {
+ status = "okay";
+};

View File

@ -0,0 +1,24 @@
From: Martin Weinelt <martin@darmstadt.freifunk.net>
Date: Tue, 8 Feb 2022 21:09:20 +0100
Subject: perl: don't build in parallel and bump release
Parallel builds cause spurious build failures with high core counts.
https://github.com/openwrt/packages/issues/8238
https://github.com/openwrt/packages/pull/17274
diff --git a/lang/perl/Makefile b/lang/perl/Makefile
index 84d256d2d8c682f18670a4cbae0a48e3333fb222..c2e5cf8e703af675dd296704597934aa9b5f7446 100644
--- a/lang/perl/Makefile
+++ b/lang/perl/Makefile
@@ -34,8 +34,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=perl/host
-PKG_BUILD_PARALLEL:=1
-HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=0
+HOST_BUILD_PARALLEL:=0
# Variables used during configuration/build
HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr

View File

@ -0,0 +1,73 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 27 Apr 2022 19:01:39 +0200
Subject: ecdsautils: verify: fix signature verification (CVE-2022-24884)
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/utils/ecdsautils/Makefile b/utils/ecdsautils/Makefile
index 7f1c76f0301f56b0a88c1f6a1a0147397fde25c7..5ba893be69d40279cd6f5c9e544e941d0011f451 100644
--- a/utils/ecdsautils/Makefile
+++ b/utils/ecdsautils/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ecdsautils
PKG_VERSION:=0.3.2.20160630
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_REV:=07538893fb6c2a9539678c45f9dbbf1e4f222b46
PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
diff --git a/utils/ecdsautils/patches/0001-verify-fix-signature-verification-CVE-2022-24884.patch b/utils/ecdsautils/patches/0001-verify-fix-signature-verification-CVE-2022-24884.patch
new file mode 100644
index 0000000000000000000000000000000000000000..34d80cc201c0e87ca654c3def4fbbbddf622b0ba
--- /dev/null
+++ b/utils/ecdsautils/patches/0001-verify-fix-signature-verification-CVE-2022-24884.patch
@@ -0,0 +1,48 @@
+From 1d4b091abdf15ad7b2312535b5b95ad70f6dbd08 Mon Sep 17 00:00:00 2001
+Message-Id: <1d4b091abdf15ad7b2312535b5b95ad70f6dbd08.1651078760.git.mschiffer@universe-factory.net>
+From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Wed, 20 Apr 2022 22:04:07 +0200
+Subject: [PATCH] verify: fix signature verification (CVE-2022-24884)
+
+Verify that r and s are non-zero. Without these checks, an all-zero
+signature is always considered valid.
+
+While it would be nicer to error out in ecdsa_verify_prepare_legacy()
+already, that would require users of libecdsautil to check a return value
+of the prepare step. To be safe, implement the fix in an API/ABI-compatible
+way that doesn't need changes to the users.
+---
+ src/lib/ecdsa.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/lib/ecdsa.c b/src/lib/ecdsa.c
+index 8cd7722be8cd..a661b56bd7c8 100644
+--- a/src/lib/ecdsa.c
++++ b/src/lib/ecdsa.c
+@@ -135,6 +135,12 @@ regenerate:
+ void ecdsa_verify_prepare_legacy(ecdsa_verify_context_t *ctx, const ecc_int256_t *hash, const ecdsa_signature_t *signature) {
+ ecc_int256_t w, u1, tmp;
+
++ if (ecc_25519_gf_is_zero(&signature->s) || ecc_25519_gf_is_zero(&signature->r)) {
++ // Signature is invalid, mark by setting ctx->r to an invalid value
++ memset(&ctx->r, 0, sizeof(ctx->r));
++ return;
++ }
++
+ ctx->r = signature->r;
+
+ ecc_25519_gf_recip(&w, &signature->s);
+@@ -149,6 +155,10 @@ bool ecdsa_verify_legacy(const ecdsa_verify_context_t *ctx, const ecc_25519_work
+ ecc_25519_work_t s2, work;
+ ecc_int256_t w, tmp;
+
++ // Signature was detected as invalid in prepare step
++ if (ecc_25519_gf_is_zero(&ctx->r))
++ return false;
++
+ ecc_25519_scalarmult(&s2, &ctx->u2, pubkey);
+ ecc_25519_add(&work, &ctx->s1, &s2);
+ ecc_25519_store_xy_legacy(&w, NULL, &work);
+--
+2.36.0
+

24
scripts/container.sh Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
# move into base directory, in case this script is not executed via `make container`
cd "$(dirname "$0")/.."
# normalize branch name to reflect a valid image name
BRANCH=$(git branch --show-current 2>/dev/null | sed 's/[^a-z0-9-]/_/ig')
TAG="gluon:${BRANCH:-latest}"
if [ "$(command -v podman)" ]
then
podman build -t "${TAG}" contrib/docker
podman run -it --rm --userns=keep-id --volume="$(pwd):/gluon" "${TAG}"
elif [ "$(command -v docker)" ]
then
docker build -t "${TAG}" contrib/docker
docker run -it --rm --volume="$(pwd):/gluon" "${TAG}"
else
1>&2 echo "Please install either podman or docker. Exiting" >/dev/null
exit 1
fi

View File

@ -65,6 +65,15 @@ device('gl.inet-gl-ar750s-nor', 'glinet_gl-ar750s', {
packages = ATH10K_PACKAGES_QCA9887,
})
-- JOY-IT
device('joy-it-jt-or750i', 'joyit_jt-or750i', {
packages = ATH10K_PACKAGES_QCA9887,
factory = false,
})
-- OCEDO
device('ocedo-raccoon', 'ocedo_raccoon', {

View File

@ -74,3 +74,10 @@ device('tp-link-tl-wr902ac-v3', 'tplink_tl-wr902ac-v3', {
device('vocore2', 'vocore2', {
factory = false,
})
-- Xiaomi
device('xiaomi-mi-router-4a-100m-edition', 'xiaomi_mir4a-100m', {
factory = false,
})