Skip to content
Snippets Groups Projects
Commit 0982c156 authored by David Bauer's avatar David Bauer
Browse files

modules: update openwrt

cdc907abed ath79: read back reset register
5ad05681f2 ath79: add support for UniFi UK-Ultra
e214118148 ath79: move UniFi AC template into common
4103958e76 mediatek: fix BPI-R3 wifi mac address
2fe497c4a5 mac80211: do not emit VHT160 capabilities if channel width is less than 160 MHz
9cd0023e54 hostapd: add missing NULL pointer check on radar notification
3bf602d740 mac80211: avoid crashing on invalid band info
d4a21d75a9 mediatek: GL-MT6000: Add missing LED state definitions
0cd6b3fd0c linux/modules: remove deprecated module
40cfdf5ffe kernel: bump 5.15 to 5.15.146
6e39d2426b ramips: add support for D-Link COVR-X1860 A1
af7ef781ac ramips: add encrypted SGE factory image for D-Link devices
67d998e25d kernel: bump 5.15 to 5.15.145
b54f7105df firmware-utils: move patch to maintaince branch
34e30fb53a firmware-utils: bump to latest openwrt-23.05
e61d651053 ramips: correct the PCIe port number for Unielec u7621-01
80ef582dee rockchip: configure eth pad driver strength for orangepi r1 plus lts
9cd589bd79 ramips: lzma-loader: use default uart for rt305x
2216b10ebb ramips: lzma-loader: use proper register names
76f7dd3312 ramips: lzma-loader: use virtual memory segments for uart base address
23506e7789 raimps: mtk_eth_soc: drop rst_esw from ESW driver
0128d860a0 ramips: dts: mt7628an: reset FE and ESW cores together
ee4a042483 ramips: dts: rt5350: reset FE and ESW cores together
4e1bf2a50c ramips: dts: rt3050: reset FE and ESW cores together
88501f82f5 ramips: dts: rt3352: reset FE and ESW cores together
289515e003 ramips: mtk_eth_soc: wait longer after FE core reset to settle
8ce87267ba ramips: mtk_eth_soc: allow multiple resets
3aec71a176 mac80211: add missing newline for "min_tx_power"
c6425bb525 kernel: delete stray linux 6.1 patch
49bde57679 kernel: fix bridge proxyarp issue with some broken DHCP clients
51881b2eb9 mediatek: add support for Routerich AX3000
18d7962f7b ramips: add support for Rostelecom RT-FE-1A
f6fb6bb2ba ramips: mt7621: use lzma-loader for Sercomm NA502
9a7b14dcfe mediatek: enable mt7981-wo-firmware package by default
9325da80ab mac80211: fix a race condition related to enabling fast-xmit
b0fc8b47e0 netifd: update to Git openwrt-23.05 (2024-01-04)
5cc1918a7a dropbear: increase default receive window size
60e49cf170 ramips: fix label-mac for Xiaomi RA75
parent 247e7816
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ GLUON_FEEDS='gluon packages routing'
OPENWRT_REPO=https://github.com/openwrt/openwrt.git
OPENWRT_BRANCH=openwrt-23.05
OPENWRT_COMMIT=59fd8f08cf544a7f0fcaf700ca9af9292de3adcc
OPENWRT_COMMIT=cdc907abedf1ad0d17cc88fd33d35a3ef3f8fc75
PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=53ea3b89771fc7d7a80f1800ce25e98dfe1633aa
......
From: David Bauer <mail@david-bauer.net>
Date: Thu, 30 Nov 2023 07:32:52 +0100
Subject: mac80211: avoid crashing on invalid band info
Frequent crashes have been observed on MT7916 based platforms. While the
root of these crashes are currently unknown, they happen when decoding
rate information of connected STAs in AP mode. The rate-information is
associated with a band which is not available on the PHY.
Check for this condition in order to avoid crashing the whole system.
This patch should be removed once the roout cause has been found and
fixed.
Link: https://github.com/freifunk-gluon/gluon/issues/2980
Signed-off-by: David Bauer <mail@david-bauer.net>
diff --git a/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch
new file mode 100644
index 0000000000000000000000000000000000000000..1847b2fe8defd67ec17a1b760ce03c0db1065f8c
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch
@@ -0,0 +1,16 @@
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -2422,6 +2422,13 @@ static void sta_stats_decode_rate(struct
+
+ sband = local->hw.wiphy->bands[band];
+
++ if (!sband) {
++ wiphy_debug(local->hw.wiphy,
++ "Invalid band %d\n",
++ band);
++ break;
++ }
++
+ if (WARN_ON_ONCE(!sband->bitrates))
+ break;
+
From: David Bauer <mail@david-bauer.net>
Date: Thu, 28 Dec 2023 23:16:02 +0100
Subject: dropbear: increase default receive window size
Increasing the receive window size improves throughout on higher-latency
links such as WAN connections. The current default of 24KB caps out at
around 500 KB/s.
Increasing the receive buffer to 256KB increases the throughput to at
least 11 MB/s.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit f95eecfb21ff08662e022accd30e8254028ff63b)
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index b82e967cbcedc4564dba6cfccc1383f7b7fa499f..a40b5f7baeea0f3a1e258f1a74aba0eb1ca3adcb 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -155,6 +155,12 @@ dropbear_instance()
PIDCOUNT="$(( ${PIDCOUNT} + 1))"
local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+ # Increase default receive window size to increase
+ # throughput on high latency links
+ if [ "${RecvWindowSize}" -eq "0" ]; then
+ RecvWindowSize="262144"
+ fi
+
procd_open_instance
procd_set_param command "$PROG" -F -P "$pid_file"
[ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
From: David Bauer <mail@david-bauer.net>
Date: Wed, 3 Jan 2024 16:43:09 +0100
Subject: netifd: system-linux: fix race condition in netlink socket error handing
The error handling needed for the buffer growth logic relies on
uloop_fd's error flag, which is set based on epoll events. Doing so
without handling recvmsg's error codes is racy, as an error state may be
set between receiving epoll events and the next recvmsg, but calling
recvmsg clears the error state.
To fix this, add handling for errors returned by nl_recvmsgs_default()
and nl_recv(); checking for u->error and retrieving the error status
using getsockopt() becomes redundant.
We have observed this issue on Gluon (recent OpenWrt 23.05); on some
devices with DSA switches, the bridge interface's carrier-on event would
consistenly get lost during boot due to insufficient buffer space
(see [1]).
We have bisected the issue to netifd commit 516ab774cc16 ("system-linux:
fix race condition on bringing up wireless devices"), but that commit only
uncovered the preexisting bug by switching from getting the carrier state
from sysfs to using the netlink messages in cb_rtnl_event().
I suspect that other recent issues about netifd missing a carrier state
change like [2] may have the same underlying cause.
[1] https://github.com/freifunk-gluon/gluon/issues/3130
[2] https://github.com/openwrt/openwrt/issues/13863
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: David Bauer <mail@david-bauer.net>
diff --git a/package/network/config/netifd/patches/0002-netifd-system-linux-fix-race-condition-in-netlink-socket-error-handing.patch b/package/network/config/netifd/patches/0002-netifd-system-linux-fix-race-condition-in-netlink-socket-error-handing.patch
new file mode 100644
index 0000000000000000000000000000000000000000..1b8dd71da622ef7aa73794bd70c636ab0fe59c4e
--- /dev/null
+++ b/package/network/config/netifd/patches/0002-netifd-system-linux-fix-race-condition-in-netlink-socket-error-handing.patch
@@ -0,0 +1,113 @@
+From 54eb773cebb74ffecf1f0c4e8ebd4b65812095c0 Mon Sep 17 00:00:00 2001
+From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Tue, 2 Jan 2024 15:58:30 +0100
+Subject: [PATCH] system-linux: fix race condition in netlink socket error
+ handing
+
+The error handling needed for the buffer growth logic relies on
+uloop_fd's error flag, which is set based on epoll events. Doing so
+without handling recvmsg's error codes is racy, as an error state may be
+set between receiving epoll events and the next recvmsg, but calling
+recvmsg clears the error state.
+
+To fix this, add handling for errors returned by nl_recvmsgs_default()
+and nl_recv(); checking for u->error and retrieving the error status
+using getsockopt() becomes redundant.
+
+We have observed this issue on Gluon (recent OpenWrt 23.05); on some
+devices with DSA switches, the bridge interface's carrier-on event would
+consistenly get lost during boot due to insufficient buffer space
+(see [1]).
+
+We have bisected the issue to netifd commit 516ab774cc16 ("system-linux:
+fix race condition on bringing up wireless devices"), but that commit only
+uncovered the preexisting bug by switching from getting the carrier state
+from sysfs to using the netlink messages in cb_rtnl_event().
+
+I suspect that other recent issues about netifd missing a carrier state
+change like [2] may have the same underlying cause.
+
+[1] https://github.com/freifunk-gluon/gluon/issues/3130
+[2] https://github.com/openwrt/openwrt/issues/13863
+
+Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
+---
+ system-linux.c | 38 +++++++++++++-------------------------
+ 1 file changed, 13 insertions(+), 25 deletions(-)
+
+--- a/system-linux.c
++++ b/system-linux.c
+@@ -169,19 +169,14 @@ static void
+ handler_nl_event(struct uloop_fd *u, unsigned int events)
+ {
+ struct event_socket *ev = container_of(u, struct event_socket, uloop);
+- int err;
+- socklen_t errlen = sizeof(err);
++ int ret;
+
+- if (!u->error) {
+- nl_recvmsgs_default(ev->sock);
++ ret = nl_recvmsgs_default(ev->sock);
++ if (ret >= 0)
+ return;
+- }
+-
+- if (getsockopt(u->fd, SOL_SOCKET, SO_ERROR, (void *)&err, &errlen))
+- goto abort;
+
+- switch(err) {
+- case ENOBUFS:
++ switch (-ret) {
++ case NLE_NOMEM:
+ /* Increase rx buffer size on netlink socket */
+ ev->bufsize *= 2;
+ if (nl_socket_set_buffer_size(ev->sock, ev->bufsize, 0))
+@@ -195,7 +190,6 @@ handler_nl_event(struct uloop_fd *u, uns
+ default:
+ goto abort;
+ }
+- u->error = false;
+ return;
+
+ abort:
+@@ -791,24 +785,19 @@ handle_hotplug_event(struct uloop_fd *u,
+ struct sockaddr_nl nla;
+ unsigned char *buf = NULL;
+ int size;
+- int err;
+- socklen_t errlen = sizeof(err);
+
+- if (!u->error) {
+- while ((size = nl_recv(ev->sock, &nla, &buf, NULL)) > 0) {
+- if (nla.nl_pid == 0)
+- handle_hotplug_msg((char *) buf, size);
++ while ((size = nl_recv(ev->sock, &nla, &buf, NULL)) > 0) {
++ if (nla.nl_pid == 0)
++ handle_hotplug_msg((char *) buf, size);
+
+- free(buf);
+- }
+- return;
++ free(buf);
+ }
+
+- if (getsockopt(u->fd, SOL_SOCKET, SO_ERROR, (void *)&err, &errlen))
+- goto abort;
++ switch (-size) {
++ case 0:
++ return;
+
+- switch(err) {
+- case ENOBUFS:
++ case NLE_NOMEM:
+ /* Increase rx buffer size on netlink socket */
+ ev->bufsize *= 2;
+ if (nl_socket_set_buffer_size(ev->sock, ev->bufsize, 0))
+@@ -818,7 +807,6 @@ handle_hotplug_event(struct uloop_fd *u,
+ default:
+ goto abort;
+ }
+- u->error = false;
+ return;
+
+ abort:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment