Skip to content
Snippets Groups Projects
Unverified Commit f18a350a authored by David Bauer's avatar David Bauer Committed by GitHub
Browse files

Merge pull request #3370 from freifunk-gluon/openwrt-24.10

base: update to OpenWrt 24.10
parents f3cae19c 77a83ce1
No related branches found
No related tags found
No related merge requests found
Showing
with 37 additions and 1785 deletions
......@@ -9,7 +9,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
file \
git \
python3 \
python3-dev \
python3-distutils \
python3-pyelftools \
python3-setuptools \
build-essential \
gawk \
unzip \
......@@ -26,6 +29,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
shellcheck \
libnss-unknown \
openssh-client \
swig \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
......
......@@ -339,10 +339,6 @@ mediatek-mt7622
- UniFi 6 LR (v1)
* Xiaomi
- AX3200 (RB03)
mpc85xx-p1010
-------------
......@@ -461,8 +457,6 @@ ramips-mt7621
* Ubiquiti
- EdgeRouter X
- EdgeRouter X-SFP
- UniFi 6 Lite
- UniFi nanoHD
......
GLUON_FEEDS='gluon packages routing'
OPENWRT_REPO=https://github.com/openwrt/openwrt.git
OPENWRT_BRANCH=openwrt-23.05
OPENWRT_COMMIT=cd9998ef1b7b842bf052fc5e7034f23a22e67bf7
OPENWRT_BRANCH=openwrt-24.10
OPENWRT_COMMIT=45f9f1551223b516cccbcca1e252e722bb3dbc08
PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=3d08b0fee8dc5d96d8bcdb985fad1d5564de4022
PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git
PACKAGES_PACKAGES_BRANCH=openwrt-23.05
PACKAGES_PACKAGES_COMMIT=7ee4fe7705f8b44ccfd2ec9470e91c8d900a65ab
PACKAGES_PACKAGES_BRANCH=openwrt-24.10
PACKAGES_PACKAGES_COMMIT=d364dcb7e55ac4202853c48e2788f0d4fbb5c513
PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git
PACKAGES_ROUTING_BRANCH=openwrt-23.05
PACKAGES_ROUTING_COMMIT=67fb1bc0cbe1cf26748e83acb872513434bd0471
PACKAGES_ROUTING_BRANCH=openwrt-24.10
PACKAGES_ROUTING_COMMIT=3f15699240c076d5ee9ed697fa5ef45355423f6f
......@@ -47,7 +47,6 @@ proto_gluon_bat0_setup() {
batctl orig_interval 5000
batctl hop_penalty "$(lookup_uci 'gluon.mesh_batman_adv.hop_penalty' 15)"
batctl noflood_mark 0x4/0x4
case "$gw_mode" in
server)
......
......@@ -6,13 +6,13 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/network/services/dropbear/patches/700-failsafe-mode.patch b/package/network/services/dropbear/patches/700-failsafe-mode.patch
new file mode 100644
index 0000000000000000000000000000000000000000..bd9cf1ce4234d94bcc5b782cc753f59993f999bc
index 0000000000000000000000000000000000000000..9b619ce80b2963c67ac62bcf95b33b28b505ad2a
--- /dev/null
+++ b/package/network/services/dropbear/patches/700-failsafe-mode.patch
@@ -0,0 +1,57 @@
+--- a/svr-auth.c
++++ b/svr-auth.c
+@@ -125,10 +125,11 @@ void recv_msg_userauth_request() {
+--- a/src/svr-auth.c
++++ b/src/svr-auth.c
+@@ -124,10 +124,11 @@ void recv_msg_userauth_request() {
+ AUTH_METHOD_NONE_LEN) == 0) {
+ TRACE(("recv_msg_userauth_request: 'none' request"))
+ if (valid_user
......@@ -28,38 +28,38 @@ index 0000000000000000000000000000000000000000..bd9cf1ce4234d94bcc5b782cc753f599
+ {
+ dropbear_log(LOG_NOTICE,
+ "Auth succeeded with blank password for '%s' from %s",
+--- a/svr-runopts.c
++++ b/svr-runopts.c
+@@ -77,6 +77,7 @@ static void printhelp(const char * progn
+--- a/src/svr-runopts.c
++++ b/src/svr-runopts.c
+@@ -82,6 +82,7 @@ static void printhelp(const char * progn
+ "-s Disable password logins\n"
+ "-g Disable password logins for root\n"
+ "-B Allow blank password logins\n"
++ "-f Failsafe mode: always allow password-less root login\n"
++ "-f Failsafe mode: always allow password-less root login\n"
+ "-t Enable two-factor authentication (both password and public key required)\n"
+ #endif
+ "-T Maximum authentication tries (default %d)\n"
+ #if DROPBEAR_SVR_LOCALTCPFWD
+@@ -144,6 +145,7 @@ void svr_getopts(int argc, char ** argv)
+@@ -166,6 +167,7 @@ void svr_getopts(int argc, char ** argv)
+ svr_opts.noauthpass = 0;
+ svr_opts.norootpass = 0;
+ svr_opts.allowblankpass = 0;
++ svr_opts.failsafe_mode = 0;
+ svr_opts.multiauthmethod = 0;
+ svr_opts.maxauthtries = MAX_AUTH_TRIES;
+ svr_opts.inetdmode = 0;
+ svr_opts.portcount = 0;
+@@ -266,6 +268,9 @@ void svr_getopts(int argc, char ** argv)
+ case 'B':
+ svr_opts.allowblankpass = 1;
+@@ -263,6 +265,9 @@ void svr_getopts(int argc, char ** argv)
+ case '2':
+ next = &reexec_fd_arg;
+ break;
++ case 'f':
++ svr_opts.failsafe_mode = 1;
++ break;
+ #endif
+ case 'h':
+ printhelp(argv[0]);
+--- a/runopts.h
++++ b/runopts.h
+@@ -106,6 +106,8 @@ typedef struct svr_runopts {
+ int allowblankpass;
+ case 'p':
+ nextisport = 1;
+--- a/src/runopts.h
++++ b/src/runopts.h
+@@ -110,6 +110,8 @@ typedef struct svr_runopts {
+ int multiauthmethod;
+ unsigned int maxauthtries;
+
++ int failsafe_mode;
......
From: Grische <github@grische.xyz>
Date: Sun, 18 Sep 2022 14:03:16 +0200
Subject: xrx200: migrate fritz7360-v2 using incorrect image
Migrate AVM FRITZ!Box 7360 v2 boards flashed with the incorrect v1 image to use
the newly added v2 target image during the next upgrade.
Using the v2 target image allows the boards to read the TFFS partition, which
is misaligned when using the v1 image.
Ref: https://github.com/freifunk-gluon/gluon/pull/2648
Co-authored-by: Jan-Niklas Burfeind <git@aiyionpri.me>
diff --git a/target/linux/lantiq/xrx200/base-files/lib/preinit/01_sysinfo.sh b/target/linux/lantiq/xrx200/base-files/lib/preinit/01_sysinfo.sh
new file mode 100644
index 0000000000000000000000000000000000000000..fab50d708e872f819c643cea79327e4f438de524
--- /dev/null
+++ b/target/linux/lantiq/xrx200/base-files/lib/preinit/01_sysinfo.sh
@@ -0,0 +1,62 @@
+set_sysinfo_xrx200_for_fritz7360_model() {
+ local board_name=$1
+ local model
+ local urlader_version urlader_memsize urlader_flashsize
+ local hexdump_format='4/1 "%02x""\n"'
+
+ # Values are based on urlader-parser-py
+ # https://github.com/grische/urlader-parser-py/blob/42970bf8dec7962317df4ff734c57ebf36df8905/parser.py#L77-L84
+ urlader_version="$(dd if=/dev/mtd0ro bs=1 skip=$((0x580+0x0)) count=4 | hexdump -e "${hexdump_format}")"
+ if [ "${urlader_version}" != "00000003" ]; then
+ logger -s -p warn -t sysinfo-xrx200 "unexpected urlader version found: ${urlader_version}"
+ return
+ fi
+
+ urlader_memsize="$(dd if=/dev/mtd0ro bs=1 skip=$((0x580+0x4)) count=4 | hexdump -e "${hexdump_format}")"
+ if [ "${urlader_memsize}" != "08000000" ]; then
+ logger -s -p warn -t sysinfo-xrx200 "unexpected memsize found: ${urlader_memsize}"
+ return
+ fi
+
+ urlader_flashsize="$(dd if=/dev/mtd0ro bs=1 skip=$((0x580+0x8)) count=4 | hexdump -e "${hexdump_format}")"
+ case "${urlader_flashsize}" in
+ "02000000") # 32MB
+ # see vr9_avm_fritz7360-v2.dts
+ board_name="avm,fritz7360-v2"
+ model="AVM FRITZ!Box 7360 V2"
+ ;;
+ "01000000") # 16MB
+ return
+ ;;
+ *)
+ logger -s -p warn -t sysinfo-xrx200 "unexpected flashsize found: ${urlader_flashsize}"
+ return
+ ;;
+ esac
+
+ logger -s -p notice -t sysinfo-xrx200 "detected ${board_name} from urlader partition /dev/mtd0ro. Enforcing model ${model}."
+ echo "${board_name}" > /tmp/sysinfo/board_name
+ echo "${model}" > /tmp/sysinfo/model
+}
+
+do_sysinfo_xrx200() {
+ local reported_board board_name model
+
+ [ -d /proc/device-tree ] || return
+ reported_board="$(strings /proc/device-tree/compatible | head -1)"
+
+ mkdir -p /tmp/sysinfo
+ # 7360 is notoriously known for not writing "v2" on their labels and many
+ # routers have flashed the wrong firmware with the wrong flash layout.
+ # We ensure that the underlying hardware is reported correctly, so that
+ # future upgrades will use the correct flash layout.
+ # Using 7360v2 hardware, an upgrade from a 7360v1/sl firmware to a 7360v2
+ # is working.
+ case "${reported_board}" in
+ avm,fritz7360sl)
+ set_sysinfo_xrx200_for_fritz7360_model "${reported_board}"
+ ;;
+ esac
+}
+
+boot_hook_add preinit_main do_sysinfo_xrx200
From: David Bauer <mail@david-bauer.net>
Date: Mon, 21 Aug 2023 23:16:14 +0200
Subject: ath79: don't create DIR-825 B1 factory image
Currently the build fails for the D-Link DIR-825 B1. THis is due to the
factory image being size-constrained. The sysupgrade image is not
affected, as OpenWrt now uses a concatenated firmware partition.
To newly install such a device, please use the latest OpenWrt 22.03
factory image and install a Gluon sysupgrade.
Signed-off-by: David Bauer <mail@david-bauer.net>
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index f264c14314ca862e39c71e821621a81f8f1957fa..d3e2a9ccd7ae3cb03e35bb4b68a2360bb4d4f84c 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1073,11 +1073,6 @@ define Device/dlink_dir-825-b1
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
kmod-leds-reset kmod-owl-loader kmod-switch-rtl8366s
IMAGE_SIZE := 7808k
- FACTORY_SIZE := 6144k
- IMAGES += factory.bin
- IMAGE/factory.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
- pad-rootfs | check-size $$$$(FACTORY_SIZE) | pad-to $$$$(FACTORY_SIZE) | \
- append-string 01AP94-AR7161-RT-080619-00
endef
TARGET_DEVICES += dlink_dir-825-b1
From: David Bauer <mail@david-bauer.net>
Date: Thu, 18 Jan 2024 00:52:09 +0100
Subject: mac80211: silence warning for missing rate information
Silence warnings for missing rate information.
These warnings do not provide value. Instead, they might rotate more
crucial information out of the kernel message ringbuffer.
Link: https://github.com/freifunk-gluon/gluon/issues/3160
Signed-off-by: David Bauer <mail@david-bauer.net>
diff --git a/package/kernel/mac80211/patches/subsys/999-silence-missing-rate.patch b/package/kernel/mac80211/patches/subsys/999-silence-missing-rate.patch
new file mode 100644
index 0000000000000000000000000000000000000000..a34455f78960ded59b60d3d9600823b39fc7b7a2
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/999-silence-missing-rate.patch
@@ -0,0 +1,11 @@
+--- a/net/mac80211/mesh_hwmp.c
++++ b/net/mac80211/mesh_hwmp.c
+@@ -350,7 +350,7 @@ u32 airtime_link_metric_get(struct ieee8
+ return MAX_METRIC;
+
+ rate = ewma_mesh_tx_rate_avg_read(&sta->mesh->tx_rate_avg);
+- if (WARN_ON(!rate))
++ if (!rate)
+ return MAX_METRIC;
+
+ err = (fail_avg << ARITH_SHIFT) / 100;
From: Felix Fietkau <nbd@nbd.name>
Date: Fri, 9 Feb 2024 20:47:39 +0100
Subject: mac80211: add AQL support for broadcast/multicast packets
Should improve performance/reliability with lots of mcast packets
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 95e633efbd1b4ffbbfc2d8abba2b05291f6e9903)
diff --git a/package/kernel/mac80211/patches/subsys/330-mac80211-add-AQL-support-for-broadcast-packets.patch b/package/kernel/mac80211/patches/subsys/330-mac80211-add-AQL-support-for-broadcast-packets.patch
new file mode 100644
index 0000000000000000000000000000000000000000..5f6754e5024f90f7ba6833c3702fe3ce425c50bb
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/330-mac80211-add-AQL-support-for-broadcast-packets.patch
@@ -0,0 +1,302 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Fri, 9 Feb 2024 19:43:40 +0100
+Subject: [PATCH] mac80211: add AQL support for broadcast packets
+
+Excessive broadcast traffic with little competing unicast traffic can easily
+flood hardware queues, leading to throughput issues. Additionally, filling
+the hardware queues with too many packets breaks FQ for broadcast data.
+Fix this by enabling AQL for broadcast packets.
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -3158,6 +3158,7 @@ enum wiphy_params_flags {
+ /* The per TXQ device queue limit in airtime */
+ #define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_L 5000
+ #define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_H 12000
++#define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_BC 50000
+
+ /* The per interface airtime threshold to switch to lower queue limit */
+ #define IEEE80211_AQL_THRESHOLD 24000
+--- a/net/mac80211/debugfs.c
++++ b/net/mac80211/debugfs.c
+@@ -215,11 +215,13 @@ static ssize_t aql_pending_read(struct f
+ "VI %u us\n"
+ "BE %u us\n"
+ "BK %u us\n"
++ "BC/MC %u us\n"
+ "total %u us\n",
+ atomic_read(&local->aql_ac_pending_airtime[IEEE80211_AC_VO]),
+ atomic_read(&local->aql_ac_pending_airtime[IEEE80211_AC_VI]),
+ atomic_read(&local->aql_ac_pending_airtime[IEEE80211_AC_BE]),
+ atomic_read(&local->aql_ac_pending_airtime[IEEE80211_AC_BK]),
++ atomic_read(&local->aql_bc_pending_airtime),
+ atomic_read(&local->aql_total_pending_airtime));
+ return simple_read_from_buffer(user_buf, count, ppos,
+ buf, len);
+@@ -245,7 +247,8 @@ static ssize_t aql_txq_limit_read(struct
+ "VO %u %u\n"
+ "VI %u %u\n"
+ "BE %u %u\n"
+- "BK %u %u\n",
++ "BK %u %u\n"
++ "BC/MC %u\n",
+ local->aql_txq_limit_low[IEEE80211_AC_VO],
+ local->aql_txq_limit_high[IEEE80211_AC_VO],
+ local->aql_txq_limit_low[IEEE80211_AC_VI],
+@@ -253,7 +256,8 @@ static ssize_t aql_txq_limit_read(struct
+ local->aql_txq_limit_low[IEEE80211_AC_BE],
+ local->aql_txq_limit_high[IEEE80211_AC_BE],
+ local->aql_txq_limit_low[IEEE80211_AC_BK],
+- local->aql_txq_limit_high[IEEE80211_AC_BK]);
++ local->aql_txq_limit_high[IEEE80211_AC_BK],
++ local->aql_txq_limit_bc);
+ return simple_read_from_buffer(user_buf, count, ppos,
+ buf, len);
+ }
+@@ -279,6 +283,11 @@ static ssize_t aql_txq_limit_write(struc
+ else
+ buf[count] = '\0';
+
++ if (sscanf(buf, "mcast %u", &q_limit_low) == 1) {
++ local->aql_txq_limit_bc = q_limit_low;
++ return count;
++ }
++
+ if (sscanf(buf, "%u %u %u", &ac, &q_limit_low, &q_limit_high) != 3)
+ return -EINVAL;
+
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1300,10 +1300,12 @@ struct ieee80211_local {
+ u16 schedule_round[IEEE80211_NUM_ACS];
+
+ u16 airtime_flags;
++ u32 aql_txq_limit_bc;
+ u32 aql_txq_limit_low[IEEE80211_NUM_ACS];
+ u32 aql_txq_limit_high[IEEE80211_NUM_ACS];
+ u32 aql_threshold;
+ atomic_t aql_total_pending_airtime;
++ atomic_t aql_bc_pending_airtime;
+ atomic_t aql_ac_pending_airtime[IEEE80211_NUM_ACS];
+
+ const struct ieee80211_ops *ops;
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -789,6 +789,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+ spin_lock_init(&local->rx_path_lock);
+ spin_lock_init(&local->queue_stop_reason_lock);
+
++ local->aql_txq_limit_bc = IEEE80211_DEFAULT_AQL_TXQ_LIMIT_BC;
+ for (i = 0; i < IEEE80211_NUM_ACS; i++) {
+ INIT_LIST_HEAD(&local->active_txqs[i]);
+ spin_lock_init(&local->active_txq_lock[i]);
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -2164,13 +2164,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre
+
+ void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local,
+ struct sta_info *sta, u8 ac,
+- u16 tx_airtime, bool tx_completed)
++ u16 tx_airtime, bool tx_completed,
++ bool mcast)
+ {
+ int tx_pending;
+
+ if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL))
+ return;
+
++ if (mcast) {
++ if (!tx_completed) {
++ atomic_add(tx_airtime, &local->aql_bc_pending_airtime);
++ return;
++ }
++
++ tx_pending = atomic_sub_return(tx_airtime,
++ &local->aql_bc_pending_airtime);
++ if (tx_pending < 0)
++ atomic_cmpxchg(&local->aql_bc_pending_airtime,
++ tx_pending, 0);
++ return;
++ }
++
+ if (!tx_completed) {
+ if (sta)
+ atomic_add(tx_airtime,
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -2553,7 +2553,7 @@ static u16 ieee80211_store_ack_skb(struc
+
+ spin_lock_irqsave(&local->ack_status_lock, flags);
+ id = idr_alloc(&local->ack_status_frames, ack_skb,
+- 1, 0x2000, GFP_ATOMIC);
++ 1, 0x1000, GFP_ATOMIC);
+ spin_unlock_irqrestore(&local->ack_status_lock, flags);
+
+ if (id >= 0) {
+@@ -3957,20 +3957,20 @@ begin:
+ encap_out:
+ IEEE80211_SKB_CB(skb)->control.vif = vif;
+
+- if (tx.sta &&
+- wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) {
+- bool ampdu = txq->ac != IEEE80211_AC_VO;
++ if (wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) {
++ bool ampdu = txq->sta && txq->ac != IEEE80211_AC_VO;
+ u32 airtime;
+
+ airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta,
+ skb->len, ampdu);
+- if (airtime) {
+- airtime = ieee80211_info_set_tx_time_est(info, airtime);
+- ieee80211_sta_update_pending_airtime(local, tx.sta,
+- txq->ac,
+- airtime,
+- false);
+- }
++ if (!airtime)
++ return skb;
++
++ airtime = ieee80211_info_set_tx_time_est(info, airtime);
++ info->tx_time_mc = !tx.sta;
++ ieee80211_sta_update_pending_airtime(local, tx.sta, txq->ac,
++ airtime, false,
++ info->tx_time_mc);
+ }
+
+ return skb;
+@@ -4025,6 +4025,7 @@ struct ieee80211_txq *ieee80211_next_txq
+ struct ieee80211_txq *ret = NULL;
+ struct txq_info *txqi = NULL, *head = NULL;
+ bool found_eligible_txq = false;
++ bool aql_check;
+
+ spin_lock_bh(&local->active_txq_lock[ac]);
+
+@@ -4048,26 +4049,26 @@ struct ieee80211_txq *ieee80211_next_txq
+ if (!head)
+ head = txqi;
+
++ aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq);
++ if (aql_check)
++ found_eligible_txq = true;
++
+ if (txqi->txq.sta) {
+ struct sta_info *sta = container_of(txqi->txq.sta,
+ struct sta_info, sta);
+- bool aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq);
+- s32 deficit = ieee80211_sta_deficit(sta, txqi->txq.ac);
+-
+- if (aql_check)
+- found_eligible_txq = true;
+-
+- if (deficit < 0)
++ if (ieee80211_sta_deficit(sta, txqi->txq.ac) < 0) {
+ sta->airtime[txqi->txq.ac].deficit +=
+ sta->airtime_weight << AIRTIME_QUANTUM_SHIFT;
+-
+- if (deficit < 0 || !aql_check) {
+- list_move_tail(&txqi->schedule_order,
+- &local->active_txqs[txqi->txq.ac]);
+- goto begin;
++ aql_check = false;
+ }
+ }
+
++ if (!aql_check) {
++ list_move_tail(&txqi->schedule_order,
++ &local->active_txqs[txqi->txq.ac]);
++ goto begin;
++ }
++
+ if (txqi->schedule_round == local->schedule_round[ac])
+ goto out;
+
+@@ -4132,7 +4133,8 @@ bool ieee80211_txq_airtime_check(struct
+ return true;
+
+ if (!txq->sta)
+- return true;
++ return atomic_read(&local->aql_bc_pending_airtime) <
++ local->aql_txq_limit_bc;
+
+ if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
+ return true;
+@@ -4181,15 +4183,15 @@ bool ieee80211_txq_may_transmit(struct i
+
+ spin_lock_bh(&local->active_txq_lock[ac]);
+
+- if (!txqi->txq.sta)
+- goto out;
+-
+ if (list_empty(&txqi->schedule_order))
+ goto out;
+
+ if (!ieee80211_txq_schedule_airtime_check(local, ac))
+ goto out;
+
++ if (!txqi->txq.sta)
++ goto out;
++
+ list_for_each_entry_safe(iter, tmp, &local->active_txqs[ac],
+ schedule_order) {
+ if (iter == txqi)
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -1092,6 +1092,7 @@ ieee80211_rate_get_vht_nss(const struct
+ * link the frame will be transmitted on
+ * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
+ * @ack_frame_id: internal frame ID for TX status, used internally
++ * @tx_time_mc: TX time is for a multicast packet
+ * @tx_time_est: TX time estimate in units of 4us, used internally
+ * @control: union part for control data
+ * @control.rates: TX rates array to try
+@@ -1131,8 +1132,9 @@ struct ieee80211_tx_info {
+ /* common information */
+ u32 flags;
+ u32 band:3,
+- ack_frame_id:13,
++ ack_frame_id:12,
+ hw_queue:4,
++ tx_time_mc:1,
+ tx_time_est:10;
+ /* 2 free bits */
+
+--- a/net/mac80211/sta_info.h
++++ b/net/mac80211/sta_info.h
+@@ -147,7 +147,8 @@ struct airtime_info {
+
+ void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local,
+ struct sta_info *sta, u8 ac,
+- u16 tx_airtime, bool tx_completed);
++ u16 tx_airtime, bool tx_completed,
++ bool mcast);
+
+ struct sta_info;
+
+--- a/net/mac80211/status.c
++++ b/net/mac80211/status.c
+@@ -716,7 +716,7 @@ static void ieee80211_report_used_skb(st
+ ieee80211_sta_update_pending_airtime(local, sta,
+ skb_get_queue_mapping(skb),
+ tx_time_est,
+- true);
++ true, info->tx_time_mc);
+ rcu_read_unlock();
+ }
+
+@@ -1127,10 +1127,11 @@ void ieee80211_tx_status_ext(struct ieee
+ /* Do this here to avoid the expensive lookup of the sta
+ * in ieee80211_report_used_skb().
+ */
++ bool mcast = IEEE80211_SKB_CB(skb)->tx_time_mc;
+ ieee80211_sta_update_pending_airtime(local, sta,
+ skb_get_queue_mapping(skb),
+ tx_time_est,
+- true);
++ true, mcast);
+ ieee80211_info_set_tx_time_est(IEEE80211_SKB_CB(skb), 0);
+ }
+
......@@ -8,10 +8,10 @@ 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 2763de2777f8e3e60db9917ad64da7d5d127ba8f..7468e6db8ea561a6285b77990c8786ef3d46967f 100644
index 6a6dd5ea86798e7e95e3657a94cca829dbd0924b..a0ffd0e982b59b871e683f745231579404a206c3 100644
--- a/lang/perl/Makefile
+++ b/lang/perl/Makefile
@@ -34,8 +34,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION)
@@ -27,8 +27,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
......
From: Linus Lüssing <linus.luessing@c0d3.blue>
Date: Sat, 1 May 2021 22:19:03 +0200
Subject: batman-adv: Introduce no noflood mark
This mark prevents a multicast packet being flooded through the whole
mesh. The advantage of marking certain multicast packets via e.g.
ebtables instead of dropping is then the following:
This allows an administrator to let specific multicast packets pass as
long as they are forwarded to a limited number of nodes only and are
therefore creating no burdon to unrelated nodes.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
diff --git a/batman-adv/patches/0034-batman-adv-Introduce-no-noflood-mark.patch b/batman-adv/patches/0034-batman-adv-Introduce-no-noflood-mark.patch
new file mode 100644
index 0000000000000000000000000000000000000000..8dbde75343f04fb3a643e300856ecfac7dc23e32
--- /dev/null
+++ b/batman-adv/patches/0034-batman-adv-Introduce-no-noflood-mark.patch
@@ -0,0 +1,156 @@
+From 25b21382238c783298c0d8defc8c739126c1b54d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
+Date: Sat, 31 Mar 2018 03:36:19 +0200
+Subject: [PATCH] batman-adv: Introduce no noflood mark
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This mark prevents a multicast packet being flooded through the whole
+mesh. The advantage of marking certain multicast packets via e.g.
+ebtables instead of dropping is then the following:
+
+This allows an administrator to let specific multicast packets pass as
+long as they are forwarded to a limited number of nodes only and are
+therefore creating no burdon to unrelated nodes.
+
+Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
+
+---
+
+https://www.open-mesh.org/projects/batman-adv/wiki/Noflood-broadcast-prevention
+
+Changelog v2:
+
+* rebased to master
+* sysfs -> netlink
+---
+ include/uapi/linux/batman_adv.h | 12 ++++++++++++
+ net/batman-adv/netlink.c | 22 ++++++++++++++++++++++
+ net/batman-adv/soft-interface.c | 20 ++++++++++++++++++++
+ net/batman-adv/types.h | 12 ++++++++++++
+ 4 files changed, 66 insertions(+)
+
+--- a/include/uapi/linux/batman_adv.h
++++ b/include/uapi/linux/batman_adv.h
+@@ -481,6 +481,18 @@ enum batadv_nl_attrs {
+ */
+ BATADV_ATTR_MULTICAST_FANOUT,
+
++ /**
++ * @BATADV_ATTR_NOFLOOD_MARK: the noflood mark which allows to tag
++ * frames which should never be broadcast flooded through the mesh.
++ */
++ BATADV_ATTR_NOFLOOD_MARK,
++
++ /**
++ * @BATADV_ATTR_NOFLOOD_MASK: the noflood (bit)mask which allows to tag
++ * frames which should never be broadcast flooded through the mesh.
++ */
++ BATADV_ATTR_NOFLOOD_MASK,
++
+ /* add attributes above here, update the policy in netlink.c */
+
+ /**
+--- a/net/batman-adv/netlink.c
++++ b/net/batman-adv/netlink.c
+@@ -134,6 +134,8 @@ static const struct nla_policy batadv_ne
+ [BATADV_ATTR_AP_ISOLATION_ENABLED] = { .type = NLA_U8 },
+ [BATADV_ATTR_ISOLATION_MARK] = { .type = NLA_U32 },
+ [BATADV_ATTR_ISOLATION_MASK] = { .type = NLA_U32 },
++ [BATADV_ATTR_NOFLOOD_MARK] = { .type = NLA_U32 },
++ [BATADV_ATTR_NOFLOOD_MASK] = { .type = NLA_U32 },
+ [BATADV_ATTR_BONDING_ENABLED] = { .type = NLA_U8 },
+ [BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED] = { .type = NLA_U8 },
+ [BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED] = { .type = NLA_U8 },
+@@ -286,6 +288,14 @@ static int batadv_netlink_mesh_fill(stru
+ bat_priv->isolation_mark_mask))
+ goto nla_put_failure;
+
++ if (nla_put_u32(msg, BATADV_ATTR_NOFLOOD_MARK,
++ bat_priv->noflood_mark))
++ goto nla_put_failure;
++
++ if (nla_put_u32(msg, BATADV_ATTR_NOFLOOD_MASK,
++ bat_priv->noflood_mark_mask))
++ goto nla_put_failure;
++
+ if (nla_put_u8(msg, BATADV_ATTR_BONDING_ENABLED,
+ !!atomic_read(&bat_priv->bonding)))
+ goto nla_put_failure;
+@@ -466,6 +476,18 @@ static int batadv_netlink_set_mesh(struc
+ bat_priv->isolation_mark_mask = nla_get_u32(attr);
+ }
+
++ if (info->attrs[BATADV_ATTR_NOFLOOD_MARK]) {
++ attr = info->attrs[BATADV_ATTR_NOFLOOD_MARK];
++
++ bat_priv->noflood_mark = nla_get_u32(attr);
++ }
++
++ if (info->attrs[BATADV_ATTR_NOFLOOD_MASK]) {
++ attr = info->attrs[BATADV_ATTR_NOFLOOD_MASK];
++
++ bat_priv->noflood_mark_mask = nla_get_u32(attr);
++ }
++
+ if (info->attrs[BATADV_ATTR_BONDING_ENABLED]) {
+ attr = info->attrs[BATADV_ATTR_BONDING_ENABLED];
+
+--- a/net/batman-adv/soft-interface.c
++++ b/net/batman-adv/soft-interface.c
+@@ -175,6 +175,23 @@ static void batadv_interface_set_rx_mode
+ {
+ }
+
++/**
++ * batadv_send_skb_has_noflood_mark() - check if packet has a noflood mark
++ * @bat_priv: the bat priv with all the soft interface information
++ * @skb: the packet to check
++ *
++ * Return: True if the skb's mark matches a configured noflood mark and
++ * noflood mark mask. False otherwise.
++ */
++static bool
++batadv_skb_has_noflood_mark(struct batadv_priv *bat_priv, struct sk_buff *skb)
++{
++ u32 match_mark = skb->mark & bat_priv->noflood_mark_mask;
++
++ return bat_priv->noflood_mark_mask &&
++ match_mark == bat_priv->noflood_mark;
++}
++
+ static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
+ struct net_device *soft_iface)
+ {
+@@ -325,6 +342,9 @@ send:
+ if (batadv_dat_snoop_outgoing_arp_request(bat_priv, skb))
+ brd_delay = msecs_to_jiffies(ARP_REQ_DELAY);
+
++ if (batadv_skb_has_noflood_mark(bat_priv, skb))
++ goto dropped;
++
+ if (batadv_skb_head_push(skb, sizeof(*bcast_packet)) < 0)
+ goto dropped;
+
+--- a/net/batman-adv/types.h
++++ b/net/batman-adv/types.h
+@@ -1635,6 +1635,18 @@ struct batadv_priv {
+ */
+ u32 isolation_mark_mask;
+
++ /**
++ * @noflood_mark: the skb->mark value used to allow directed targeting
++ * only
++ */
++ u32 noflood_mark;
++
++ /**
++ * @noflood_mark_mask: bitmask identifying the bits in skb->mark to be
++ * used for the noflood mark
++ */
++ u32 noflood_mark_mask;
++
+ /** @bcast_seqno: last sent broadcast packet sequence number */
+ atomic_t bcast_seqno;
+
From: Linus Lüssing <linus.luessing@c0d3.blue>
Date: Sat, 1 May 2021 22:19:41 +0200
Subject: batctl: Add noflood_mark command
Adds support for the new 'noflood_mark' setting in batman-adv.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
diff --git a/batctl/patches/0012-batctl-Add-noflood_mark-command.patch b/batctl/patches/0012-batctl-Add-noflood_mark-command.patch
new file mode 100644
index 0000000000000000000000000000000000000000..1234c56cc0be080de8142f3a563cf4e070c4840a
--- /dev/null
+++ b/batctl/patches/0012-batctl-Add-noflood_mark-command.patch
@@ -0,0 +1,226 @@
+From c14abebbeb4af76600cd6eb508e5e4e38a436b2f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
+Date: Fri, 26 Apr 2019 19:27:38 +0200
+Subject: [PATCH] batctl: Add noflood_mark command
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Adds support for the new 'noflood_mark' setting in batman-adv.
+
+Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
+---
+Changelog v3:
+* changed command from a noflood tri-state option
+ to a value/mask one similar to the isolation mark
+* noflood.c -> noflood_mark.c
+
+Changelog v2:
+* added noflood.c
+---
+ Makefile | 1 +
+ README.rst | 15 ++++++
+ batman_adv.h | 12 +++++
+ man/batctl.8 | 23 ++++++++
+ noflood_mark.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 192 insertions(+)
+ create mode 100644 noflood_mark.c
+
+--- a/Makefile
++++ b/Makefile
+@@ -69,6 +69,7 @@ $(eval $(call add_command,multicast_mode
+ $(eval $(call add_command,neighbors,y))
+ $(eval $(call add_command,neighbors_json,y))
+ $(eval $(call add_command,network_coding,y))
++$(eval $(call add_command,noflood_mark,y))
+ $(eval $(call add_command,orig_interval,y))
+ $(eval $(call add_command,originators,y))
+ $(eval $(call add_command,originators_json,y))
+--- a/README.rst
++++ b/README.rst
+@@ -419,6 +419,21 @@ Example::
+
+
+
++batctl noflood_mark
++=======================
++
++display or modify noflood_mark setting
++
++Usage::
++
++ batctl noflood_mark|nf $value[/0x$mask]
++
++* Example 1: ``batctl nf 0x00000001/0xffffffff``
++* Example 2: ``batctl nf 0x00040000/0xffff0000``
++* Example 3: ``batctl nf 16``
++* Example 4: ``batctl nf 0x0f``
++
++
+ batctl translocal
+ -----------------
+
+--- a/batman_adv.h
++++ b/batman_adv.h
+@@ -481,6 +481,18 @@ enum batadv_nl_attrs {
+ */
+ BATADV_ATTR_MULTICAST_FANOUT,
+
++ /**
++ * @BATADV_ATTR_NOFLOOD_MARK: the noflood mark which allows to tag
++ * frames which should never be broadcast flooded through the mesh.
++ */
++ BATADV_ATTR_NOFLOOD_MARK,
++
++ /**
++ * @BATADV_ATTR_NOFLOOD_MASK: the noflood (bit)mask which allows to tag
++ * frames which should never be broadcast flooded through the mesh.
++ */
++ BATADV_ATTR_NOFLOOD_MASK,
++
+ /* add attributes above here, update the policy in netlink.c */
+
+ /**
+--- /dev/null
++++ b/noflood_mark.c
+@@ -0,0 +1,140 @@
++// SPDX-License-Identifier: GPL-2.0
++/* Copyright (C) 2009-2019 B.A.T.M.A.N. contributors:
++ *
++ * Antonio Quartulli <a@unstable.cc>
++ * Linus Lüssing <linus.luessing@c0d3.blue>
++ *
++ * License-Filename: LICENSES/preferred/GPL-2.0
++ */
++
++#include <errno.h>
++#include <stddef.h>
++#include <stdint.h>
++#include <string.h>
++
++#include "main.h"
++#include "sys.h"
++
++static struct noflood_mark_data {
++ uint32_t noflood_mark;
++ uint32_t noflood_mask;
++} noflood_mark;
++
++static int parse_noflood_mark(struct state *state, int argc, char *argv[])
++{
++ struct settings_data *settings = state->cmd->arg;
++ struct noflood_mark_data *data = settings->data;
++ char *mask_ptr;
++ char buff[256];
++ uint32_t mark;
++ uint32_t mask;
++ char *endptr;
++
++ if (argc != 2) {
++ fprintf(stderr, "Error - incorrect number of arguments (expected 1)\n");
++ return -EINVAL;
++ }
++
++ strncpy(buff, argv[1], sizeof(buff));
++ buff[sizeof(buff) - 1] = '\0';
++
++ /* parse the mask if it has been specified, otherwise assume the mask is
++ * the biggest possible
++ */
++ mask = 0xFFFFFFFF;
++ mask_ptr = strchr(buff, '/');
++ if (mask_ptr) {
++ *mask_ptr = '\0';
++ mask_ptr++;
++
++ /* the mask must be entered in hex base as it is going to be a
++ * bitmask and not a prefix length
++ */
++ mask = strtoul(mask_ptr, &endptr, 16);
++ if (!endptr || *endptr != '\0')
++ goto inval_format;
++ }
++
++ /* the mark can be entered in any base */
++ mark = strtoul(buff, &endptr, 0);
++ if (!endptr || *endptr != '\0')
++ goto inval_format;
++
++ data->noflood_mask = mask;
++ /* erase bits not covered by the mask */
++ data->noflood_mark = mark & mask;
++
++ return 0;
++
++inval_format:
++ fprintf(stderr, "Error - incorrect number of arguments (expected 1)\n");
++ fprintf(stderr, "The following formats for mark(/mask) are allowed:\n");
++ fprintf(stderr, " * 0x12345678\n");
++ fprintf(stderr, " * 0x12345678/0xabcdef09\n");
++ return -EINVAL;
++}
++
++static int print_noflood_mark(struct nl_msg *msg, void *arg)
++{
++ struct nlattr *attrs[BATADV_ATTR_MAX + 1];
++ struct nlmsghdr *nlh = nlmsg_hdr(msg);
++ struct genlmsghdr *ghdr;
++ int *result = arg;
++
++ if (!genlmsg_valid_hdr(nlh, 0))
++ return NL_OK;
++
++ ghdr = nlmsg_data(nlh);
++
++ if (nla_parse(attrs, BATADV_ATTR_MAX, genlmsg_attrdata(ghdr, 0),
++ genlmsg_len(ghdr), batadv_netlink_policy)) {
++ return NL_OK;
++ }
++
++ if (!attrs[BATADV_ATTR_NOFLOOD_MARK] ||
++ !attrs[BATADV_ATTR_NOFLOOD_MASK])
++ return NL_OK;
++
++ printf("0x%08x/0x%08x\n",
++ nla_get_u32(attrs[BATADV_ATTR_NOFLOOD_MARK]),
++ nla_get_u32(attrs[BATADV_ATTR_NOFLOOD_MASK]));
++
++ *result = 0;
++ return NL_STOP;
++}
++
++static int get_noflood_mark(struct state *state)
++{
++ return sys_simple_nlquery(state, BATADV_CMD_GET_MESH,
++ NULL, print_noflood_mark);
++}
++
++static int set_attrs_noflood_mark(struct nl_msg *msg, void *arg)
++{
++ struct state *state = arg;
++ struct settings_data *settings = state->cmd->arg;
++ struct noflood_mark_data *data = settings->data;
++
++ nla_put_u32(msg, BATADV_ATTR_NOFLOOD_MARK, data->noflood_mark);
++ nla_put_u32(msg, BATADV_ATTR_NOFLOOD_MASK, data->noflood_mask);
++
++ return 0;
++}
++
++static int set_noflood_mark(struct state *state)
++{
++ return sys_simple_nlquery(state, BATADV_CMD_SET_MESH,
++ set_attrs_noflood_mark, NULL);
++}
++
++static struct settings_data batctl_settings_noflood_mark = {
++ .data = &noflood_mark,
++ .parse = parse_noflood_mark,
++ .netlink_get = get_noflood_mark,
++ .netlink_set = set_noflood_mark,
++};
++
++COMMAND_NAMED(SUBCOMMAND, noflood_mark, "nf", handle_sys_setting,
++ COMMAND_FLAG_MESH_IFACE | COMMAND_FLAG_NETLINK,
++ &batctl_settings_noflood_mark,
++ "[mark] \tdisplay or modify noflood_mark setting");
......@@ -92,5 +92,6 @@ if (env.GLUON_DEVICES or '') == '' then
lib.exec {'rm', '-f', dest_dir('\0')..'/\0'}
lib.exec({'rmdir', '-p', dest_dir('\0')}, true, '2>/dev/null')
mkdir(dest_dir(package_prefix))
lib.exec {'rm', '-rf', 'openwrt/bin/targets/'..bindir..'/packages/tmp'}
lib.exec {'cp', 'openwrt/bin/targets/'..bindir..'/packages/\0', dest_dir(package_prefix)}
end
......@@ -59,10 +59,13 @@ try_config('TARGET_SQUASHFS_BLOCK_SIZE', 256)
config('KERNEL_PROC_STRIPPED', true)
config('KERNEL_AIO', false)
config('KERNEL_IO_URING', false)
try_config('KERNEL_IO_URING', false)
config('KERNEL_FHANDLE', false)
config('KERNEL_FANOTIFY', false)
config('KERNEL_CGROUPS', false)
-- KERNEL_NAMESPACES is required for procd-ujail
-- This option is enabled by default on non small flash targets
config('KERNEL_NAMESPACES', true)
config('KERNEL_IP_MROUTE', false)
config('KERNEL_IPV6_MROUTE', false)
config('KERNEL_IPV6_SEG6_LWTUNNEL', false)
......
......@@ -13,9 +13,3 @@ device('ubiquiti-unifi-6-lr-v1', 'ubnt_unifi-6-lr-v1', {
manifest_aliases = {'ubiquiti-unifi-6-lr'}, -- Upgrade from OpenWrt 22.03
})
-- Xiaomi
device('xiaomi-redmi-router-ax6s', 'xiaomi_redmi-router-ax6s', {
factory = false,
})
......@@ -166,17 +166,3 @@ device('zyxel-wsm20', 'zyxel_wsm20', {
factory = false,
})
-- Devices without WLAN
-- Ubiquiti
device('ubiquiti-edgerouter-x', 'ubnt_edgerouter-x', {
factory = false,
packages = {'-hostapd-mini'},
})
device('ubiquiti-edgerouter-x-sfp', 'ubnt_edgerouter-x-sfp', {
factory = false,
packages = {'-hostapd-mini'},
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment