From 13397b2b95b4800fb0a29c3d483fa280d10f0eb0 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 2 May 2021 17:42:19 +0200 Subject: [PATCH 1/4] busybox: backport fix for CVE-2021-28831 This backports a fix for the low priority CVE-2021-28831: decompress_gunzip.c in BusyBox through 1.32.1 mishandles the error bit on the huft_build result pointer, with a resultant invalid free or segmentation fault, via malformed gzip data. Signed-off-by: Hauke Mehrtens --- package/utils/busybox/Makefile | 2 +- .../patches/005-backport-CVE-2021-28831.patch | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 package/utils/busybox/patches/005-backport-CVE-2021-28831.patch diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 9df358ef78..58bc1e6795 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_VERSION:=1.33.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch b/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch new file mode 100644 index 0000000000..7637679a69 --- /dev/null +++ b/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch @@ -0,0 +1,52 @@ +From f25d254dfd4243698c31a4f3153d4ac72aa9e9bd Mon Sep 17 00:00:00 2001 +From: Samuel Sapalski +Date: Wed, 3 Mar 2021 16:31:22 +0100 +Subject: decompress_gunzip: Fix DoS if gzip is corrupt + +On certain corrupt gzip files, huft_build will set the error bit on +the result pointer. If afterwards abort_unzip is called huft_free +might run into a segmentation fault or an invalid pointer to +free(p). + +In order to mitigate this, we check in huft_free if the error bit +is set and clear it before the linked list is freed. + +Signed-off-by: Samuel Sapalski +Signed-off-by: Peter Kaestle +Signed-off-by: Denys Vlasenko +--- + archival/libarchive/decompress_gunzip.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/archival/libarchive/decompress_gunzip.c ++++ b/archival/libarchive/decompress_gunzip.c +@@ -220,10 +220,20 @@ static const uint8_t border[] ALIGN1 = { + * each table. + * t: table to free + */ ++#define BAD_HUFT(p) ((uintptr_t)(p) & 1) ++#define ERR_RET ((huft_t*)(uintptr_t)1) + static void huft_free(huft_t *p) + { + huft_t *q; + ++ /* ++ * If 'p' has the error bit set we have to clear it, otherwise we might run ++ * into a segmentation fault or an invalid pointer to free(p) ++ */ ++ if (BAD_HUFT(p)) { ++ p = (huft_t*)((uintptr_t)(p) ^ (uintptr_t)(ERR_RET)); ++ } ++ + /* Go through linked list, freeing from the malloced (t[-1]) address. */ + while (p) { + q = (--p)->v.t; +@@ -289,8 +299,6 @@ static unsigned fill_bitbuffer(STATE_PAR + * or a valid pointer to a Huffman table, ORed with 0x1 if incompete table + * is given: "fixed inflate" decoder feeds us such data. + */ +-#define BAD_HUFT(p) ((uintptr_t)(p) & 1) +-#define ERR_RET ((huft_t*)(uintptr_t)1) + static huft_t* huft_build(const unsigned *b, const unsigned n, + const unsigned s, const struct cp_ext *cp_ext, + unsigned *m) From 17ac9849d3ff687c8c14d63e46f3e205adc22a3e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 2 May 2021 18:45:40 +0200 Subject: [PATCH 2/4] mac80211: Update to version 5.10.34-1 The removed patches were applied upstream and are not needed anymore. Signed-off-by: Hauke Mehrtens --- package/kernel/mac80211/Makefile | 6 +- .../ath/500-ath9k_eeprom_debugfs.patch | 4 +- .../ath/512-ath9k_channelbw_debugfs.patch | 4 +- .../patches/ath/530-ath9k_extra_leds.patch | 10 +-- .../patches/ath/542-ath9k_debugfs_diag.patch | 4 +- .../ath/548-ath9k_enable_gpio_chip.patch | 4 +- .../ath/549-ath9k_enable_gpio_buttons.patch | 2 +- .../ath/551-ath9k_ubnt_uap_plus_hsr.patch | 2 +- .../mac80211/patches/ath/552-ahb_of.patch | 2 +- ...itting-to-stations-in-dynamic-SMPS-m.patch | 49 --------------- .../ath/930-ath10k_add_tpt_led_trigger.patch | 4 +- ...rolling-support-for-various-chipsets.patch | 2 +- ...75-ath10k-use-tpt-trigger-by-default.patch | 2 +- .../100-remove-cryptoapi-dependencies.patch | 7 ++- .../subsys/150-disable_addr_notifier.patch | 6 +- .../mac80211/patches/subsys/210-ap_scan.patch | 2 +- ...ort-immediate-reconnect-request-hint.patch | 14 ++--- ...-driver-based-disconnect-with-reconn.patch | 12 ++-- .../370-mac80211-fix-TXQ-AC-confusion.patch | 61 ------------------- ...c80211-fix-time-is-after-bug-in-mlme.patch | 31 ---------- .../500-mac80211_configure_antenna_gain.patch | 8 +-- 21 files changed, 48 insertions(+), 188 deletions(-) delete mode 100644 package/kernel/mac80211/patches/ath/560-ath9k-fix-transmitting-to-stations-in-dynamic-SMPS-m.patch delete mode 100644 package/kernel/mac80211/patches/subsys/370-mac80211-fix-TXQ-AC-confusion.patch delete mode 100644 package/kernel/mac80211/patches/subsys/374-mac80211-fix-time-is-after-bug-in-mlme.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index b92df681cb..4d10de09a7 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=5.10.16-1 +PKG_VERSION:=5.10.34-1 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.16/ -PKG_HASH:=12856db780c5023edc47e2d18486eb3346bb7c82f1f2fc48deb3b163142f7d2d +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.34/ +PKG_HASH:=03c4ca6bf47d4e50b91b61bc2943a98c788439e56ce2b4080bc4c94141c2c15b PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch b/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch index 786a3ed3fb..48ccc81308 100644 --- a/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch +++ b/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1361,6 +1361,53 @@ void ath9k_deinit_debug(struct ath_softc +@@ -1364,6 +1364,53 @@ void ath9k_deinit_debug(struct ath_softc ath9k_cmn_spectral_deinit_debug(&sc->spec_priv); } @@ -54,7 +54,7 @@ int ath9k_init_debug(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); -@@ -1380,6 +1427,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1383,6 +1430,8 @@ int ath9k_init_debug(struct ath_hw *ah) ath9k_tx99_init_debug(sc); ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy); diff --git a/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch index 80e33182f7..126d1d5c62 100644 --- a/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch +++ b/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1408,6 +1408,52 @@ static const struct file_operations fops +@@ -1411,6 +1411,52 @@ static const struct file_operations fops .owner = THIS_MODULE }; @@ -53,7 +53,7 @@ int ath9k_init_debug(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); -@@ -1429,6 +1475,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1432,6 +1478,8 @@ int ath9k_init_debug(struct ath_hw *ah) debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc, &fops_eeprom); diff --git a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch index 1f19483064..5fd5c73a2f 100644 --- a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch +++ b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -843,6 +843,9 @@ static inline int ath9k_dump_btcoex(stru +@@ -844,6 +844,9 @@ static inline int ath9k_dump_btcoex(stru #ifdef CPTCFG_MAC80211_LEDS void ath_init_leds(struct ath_softc *sc); void ath_deinit_leds(struct ath_softc *sc); @@ -10,7 +10,7 @@ #else static inline void ath_init_leds(struct ath_softc *sc) { -@@ -979,6 +982,13 @@ void ath_ant_comb_scan(struct ath_softc +@@ -980,6 +983,13 @@ void ath_ant_comb_scan(struct ath_softc #define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */ @@ -24,7 +24,7 @@ struct ath_softc { struct ieee80211_hw *hw; struct device *dev; -@@ -1032,9 +1042,8 @@ struct ath_softc { +@@ -1033,9 +1043,8 @@ struct ath_softc { spinlock_t chan_lock; #ifdef CPTCFG_MAC80211_LEDS @@ -192,7 +192,7 @@ #endif --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1453,6 +1453,61 @@ static const struct file_operations fops +@@ -1456,6 +1456,61 @@ static const struct file_operations fops .llseek = default_llseek, }; @@ -254,7 +254,7 @@ int ath9k_init_debug(struct ath_hw *ah) { -@@ -1477,6 +1532,10 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1480,6 +1535,10 @@ int ath9k_init_debug(struct ath_hw *ah) &fops_eeprom); debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_chanbw); diff --git a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch index 76cb63a5c8..f93a6fe5cd 100644 --- a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1509,6 +1509,50 @@ static const struct file_operations fops +@@ -1512,6 +1512,50 @@ static const struct file_operations fops #endif @@ -51,7 +51,7 @@ int ath9k_init_debug(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); -@@ -1536,6 +1580,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1539,6 +1583,8 @@ int ath9k_init_debug(struct ath_hw *ah) debugfs_create_file("gpio_led", S_IWUSR, sc->debug.debugfs_phy, sc, &fops_gpio_led); #endif diff --git a/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch b/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch index 78206d2860..88198a4562 100644 --- a/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch +++ b/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau #include "common.h" #include "debug.h" -@@ -989,6 +990,14 @@ struct ath_led { +@@ -990,6 +991,14 @@ struct ath_led { struct led_classdev cdev; }; @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau struct ath_softc { struct ieee80211_hw *hw; struct device *dev; -@@ -1044,6 +1053,9 @@ struct ath_softc { +@@ -1045,6 +1054,9 @@ struct ath_softc { #ifdef CPTCFG_MAC80211_LEDS const char *led_default_trigger; struct list_head leds; diff --git a/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch index 716e09f351..83076b8ae4 100644 --- a/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch +++ b/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -1055,6 +1055,7 @@ struct ath_softc { +@@ -1056,6 +1056,7 @@ struct ath_softc { struct list_head leds; #ifdef CONFIG_GPIOLIB struct ath9k_gpio_chip *gpiochip; diff --git a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch index 7e3e1236f7..acb9ad443c 100644 --- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch @@ -381,7 +381,7 @@ ATH9K_HTC_DEBUGFS= --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig -@@ -60,6 +60,19 @@ config ATH9K_AHB +@@ -58,6 +58,19 @@ config ATH9K_AHB Say Y, if you have a SoC with a compatible built-in wireless MAC. Say N if unsure. diff --git a/package/kernel/mac80211/patches/ath/552-ahb_of.patch b/package/kernel/mac80211/patches/ath/552-ahb_of.patch index 2552bbc7a1..8fd6e4409b 100644 --- a/package/kernel/mac80211/patches/ath/552-ahb_of.patch +++ b/package/kernel/mac80211/patches/ath/552-ahb_of.patch @@ -325,7 +325,7 @@ #include "common.h" #include "debug.h" -@@ -1011,6 +1012,9 @@ struct ath_softc { +@@ -1012,6 +1013,9 @@ struct ath_softc { struct ath_hw *sc_ah; void __iomem *mem; int irq; diff --git a/package/kernel/mac80211/patches/ath/560-ath9k-fix-transmitting-to-stations-in-dynamic-SMPS-m.patch b/package/kernel/mac80211/patches/ath/560-ath9k-fix-transmitting-to-stations-in-dynamic-SMPS-m.patch deleted file mode 100644 index 68f3a31548..0000000000 --- a/package/kernel/mac80211/patches/ath/560-ath9k-fix-transmitting-to-stations-in-dynamic-SMPS-m.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Felix Fietkau -Date: Sun, 14 Feb 2021 19:45:50 +0100 -Subject: [PATCH] ath9k: fix transmitting to stations in dynamic SMPS mode - -When transmitting to a receiver in dynamic SMPS mode, all transmissions that -use multiple spatial streams need to be sent using CTS-to-self or RTS/CTS to -give the receiver's extra chains some time to wake up. -This fixes the tx rate getting stuck at <= MCS7 for some clients, especially -Intel ones, which make aggressive use of SMPS. - -Cc: stable@vger.kernel.org -Reported-by: Martin Kennedy -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/ath9k.h -+++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -179,7 +179,8 @@ struct ath_frame_info { - s8 txq; - u8 keyix; - u8 rtscts_rate; -- u8 retries : 7; -+ u8 retries : 6; -+ u8 dyn_smps : 1; - u8 baw_tracked : 1; - u8 tx_power; - enum ath9k_key_type keytype:2; ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -1271,6 +1271,11 @@ static void ath_buf_set_rate(struct ath_ - is_40, is_sgi, is_sp); - if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC)) - info->rates[i].RateFlags |= ATH9K_RATESERIES_STBC; -+ if (rix >= 8 && fi->dyn_smps) { -+ info->rates[i].RateFlags |= -+ ATH9K_RATESERIES_RTS_CTS; -+ info->flags |= ATH9K_TXDESC_CTSENA; -+ } - - info->txpower[i] = ath_get_rate_txpower(sc, bf, rix, - is_40, false); -@@ -2114,6 +2119,7 @@ static void setup_frame_info(struct ieee - fi->keyix = an->ps_key; - else - fi->keyix = ATH9K_TXKEYIX_INVALID; -+ fi->dyn_smps = sta && sta->smps_mode == IEEE80211_SMPS_DYNAMIC; - fi->keytype = keytype; - fi->framelen = framelen; - fi->tx_power = txpower; diff --git a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch index 1fedd337ac..74b3292e0c 100644 --- a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -9713,6 +9713,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -9708,6 +9708,21 @@ static int ath10k_mac_init_rd(struct ath return 0; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -10062,6 +10077,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -10057,6 +10072,12 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; diff --git a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index ab7cb669bb..ac46e35b67 100644 --- a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -456,7 +456,7 @@ v13: { --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c -@@ -4585,6 +4585,8 @@ static const struct wmi_ops wmi_tlv_ops +@@ -4591,6 +4591,8 @@ static const struct wmi_ops wmi_tlv_ops .gen_echo = ath10k_wmi_tlv_op_gen_echo, .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, diff --git a/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch index f7569df33c..6da7bfa725 100644 --- a/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -10079,7 +10079,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10074,7 +10074,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch index 7b036e4e4c..ec6ecbcfce 100644 --- a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch +++ b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch @@ -20,7 +20,7 @@ ethtool.o \ --- a/net/mac80211/aead_api.c +++ /dev/null -@@ -1,112 +0,0 @@ +@@ -1,113 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Copyright 2003-2004, Instant802 Networks, Inc. @@ -46,6 +46,7 @@ - struct aead_request *aead_req; - int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); - u8 *__aad; +- int ret; - - aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC); - if (!aead_req) @@ -63,10 +64,10 @@ - aead_request_set_crypt(aead_req, sg, sg, data_len, b_0); - aead_request_set_ad(aead_req, sg[0].length); - -- crypto_aead_encrypt(aead_req); +- ret = crypto_aead_encrypt(aead_req); - kfree_sensitive(aead_req); - -- return 0; +- return ret; -} - -int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, diff --git a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch index 8a717558a7..9589235f71 100644 --- a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch +++ b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch @@ -18,7 +18,7 @@ static int ieee80211_ifa6_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -1301,14 +1301,14 @@ int ieee80211_register_hw(struct ieee802 +@@ -1312,14 +1312,14 @@ int ieee80211_register_hw(struct ieee802 rtnl_unlock(); @@ -35,7 +35,7 @@ local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed; result = register_inet6addr_notifier(&local->ifa6_notifier); if (result) -@@ -1317,13 +1317,13 @@ int ieee80211_register_hw(struct ieee802 +@@ -1328,13 +1328,13 @@ int ieee80211_register_hw(struct ieee802 return 0; @@ -52,7 +52,7 @@ fail_ifa: #endif wiphy_unregister(local->hw.wiphy); -@@ -1351,10 +1351,10 @@ void ieee80211_unregister_hw(struct ieee +@@ -1362,10 +1362,10 @@ void ieee80211_unregister_hw(struct ieee tasklet_kill(&local->tx_pending_tasklet); tasklet_kill(&local->tasklet); diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index 80f995737b..ee49942459 100644 --- a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2442,7 +2442,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2444,7 +2444,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch b/package/kernel/mac80211/patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch index d3f4aa7972..cbc2a2e03d 100644 --- a/package/kernel/mac80211/patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch +++ b/package/kernel/mac80211/patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch @@ -64,7 +64,7 @@ Signed-off-by: Johannes Berg else cfg80211_rx_mlme_mgmt(sdata->dev, buf, len); -@@ -4716,7 +4716,8 @@ void ieee80211_mgd_quiesce(struct ieee80 +@@ -4719,7 +4719,8 @@ void ieee80211_mgd_quiesce(struct ieee80 if (ifmgd->auth_data) ieee80211_destroy_auth_data(sdata, false); cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf, @@ -166,7 +166,7 @@ Signed-off-by: Johannes Berg --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -732,6 +732,7 @@ static const struct nla_policy nl80211_p +@@ -736,6 +736,7 @@ static const struct nla_policy nl80211_p NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), [NL80211_ATTR_S1G_CAPABILITY_MASK] = NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), @@ -174,7 +174,7 @@ Signed-off-by: Johannes Berg }; /* policy for the key attributes */ -@@ -15899,7 +15900,7 @@ static void nl80211_send_mlme_event(stru +@@ -15903,7 +15904,7 @@ static void nl80211_send_mlme_event(stru const u8 *buf, size_t len, enum nl80211_commands cmd, gfp_t gfp, int uapsd_queues, const u8 *req_ies, @@ -183,7 +183,7 @@ Signed-off-by: Johannes Berg { struct sk_buff *msg; void *hdr; -@@ -15921,6 +15922,9 @@ static void nl80211_send_mlme_event(stru +@@ -15925,6 +15926,9 @@ static void nl80211_send_mlme_event(stru nla_put(msg, NL80211_ATTR_REQ_IE, req_ies_len, req_ies))) goto nla_put_failure; @@ -193,7 +193,7 @@ Signed-off-by: Johannes Berg if (uapsd_queues >= 0) { struct nlattr *nla_wmm = nla_nest_start_noflag(msg, NL80211_ATTR_STA_WME); -@@ -15949,7 +15953,8 @@ void nl80211_send_rx_auth(struct cfg8021 +@@ -15953,7 +15957,8 @@ void nl80211_send_rx_auth(struct cfg8021 size_t len, gfp_t gfp) { nl80211_send_mlme_event(rdev, netdev, buf, len, @@ -203,7 +203,7 @@ Signed-off-by: Johannes Berg } void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev, -@@ -15959,23 +15964,25 @@ void nl80211_send_rx_assoc(struct cfg802 +@@ -15963,23 +15968,25 @@ void nl80211_send_rx_assoc(struct cfg802 { nl80211_send_mlme_event(rdev, netdev, buf, len, NL80211_CMD_ASSOCIATE, gfp, uapsd_queues, @@ -234,7 +234,7 @@ Signed-off-by: Johannes Berg } void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev, const u8 *buf, -@@ -16006,7 +16013,7 @@ void cfg80211_rx_unprot_mlme_mgmt(struct +@@ -16010,7 +16017,7 @@ void cfg80211_rx_unprot_mlme_mgmt(struct trace_cfg80211_rx_unprot_mlme_mgmt(dev, buf, len); nl80211_send_mlme_event(rdev, dev, buf, len, cmd, GFP_ATOMIC, -1, diff --git a/package/kernel/mac80211/patches/subsys/301-mac80211-support-driver-based-disconnect-with-reconn.patch b/package/kernel/mac80211/patches/subsys/301-mac80211-support-driver-based-disconnect-with-reconn.patch index 8f948c140e..59a154a543 100644 --- a/package/kernel/mac80211/patches/subsys/301-mac80211-support-driver-based-disconnect-with-reconn.patch +++ b/package/kernel/mac80211/patches/subsys/301-mac80211-support-driver-based-disconnect-with-reconn.patch @@ -174,7 +174,7 @@ Signed-off-by: Johannes Berg } static int ieee80211_auth(struct ieee80211_sub_if_data *sdata) -@@ -5431,7 +5462,8 @@ int ieee80211_mgd_auth(struct ieee80211_ +@@ -5434,7 +5465,8 @@ int ieee80211_mgd_auth(struct ieee80211_ ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true, @@ -184,7 +184,7 @@ Signed-off-by: Johannes Berg } sdata_info(sdata, "authenticate with %pM\n", req->bss->bssid); -@@ -5503,7 +5535,8 @@ int ieee80211_mgd_assoc(struct ieee80211 +@@ -5506,7 +5538,8 @@ int ieee80211_mgd_assoc(struct ieee80211 ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true, @@ -194,7 +194,7 @@ Signed-off-by: Johannes Berg } if (ifmgd->auth_data && !ifmgd->auth_data->done) { -@@ -5802,7 +5835,7 @@ int ieee80211_mgd_deauth(struct ieee8021 +@@ -5805,7 +5838,7 @@ int ieee80211_mgd_deauth(struct ieee8021 ieee80211_destroy_auth_data(sdata, false); ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true, @@ -203,7 +203,7 @@ Signed-off-by: Johannes Berg return 0; } -@@ -5822,7 +5855,7 @@ int ieee80211_mgd_deauth(struct ieee8021 +@@ -5825,7 +5858,7 @@ int ieee80211_mgd_deauth(struct ieee8021 ieee80211_destroy_assoc_data(sdata, false, true); ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true, @@ -212,7 +212,7 @@ Signed-off-by: Johannes Berg return 0; } -@@ -5837,7 +5870,7 @@ int ieee80211_mgd_deauth(struct ieee8021 +@@ -5840,7 +5873,7 @@ int ieee80211_mgd_deauth(struct ieee8021 req->reason_code, tx, frame_buf); ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true, @@ -221,7 +221,7 @@ Signed-off-by: Johannes Berg return 0; } -@@ -5870,7 +5903,7 @@ int ieee80211_mgd_disassoc(struct ieee80 +@@ -5873,7 +5906,7 @@ int ieee80211_mgd_disassoc(struct ieee80 frame_buf); ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true, diff --git a/package/kernel/mac80211/patches/subsys/370-mac80211-fix-TXQ-AC-confusion.patch b/package/kernel/mac80211/patches/subsys/370-mac80211-fix-TXQ-AC-confusion.patch deleted file mode 100644 index 0b7c8dd49b..0000000000 --- a/package/kernel/mac80211/patches/subsys/370-mac80211-fix-TXQ-AC-confusion.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Johannes Berg -Date: Tue, 23 Mar 2021 21:05:01 +0100 -Subject: [PATCH] mac80211: fix TXQ AC confusion - -Normally, TXQs have - - txq->tid = tid; - txq->ac = ieee80211_ac_from_tid(tid); - -However, the special management TXQ actually has - - txq->tid = IEEE80211_NUM_TIDS; // 16 - txq->ac = IEEE80211_AC_VO; - -This makes sense, but ieee80211_ac_from_tid(16) is the same -as ieee80211_ac_from_tid(0) which is just IEEE80211_AC_BE. - -Now, normally this is fine. However, if the netdev queues -were stopped, then the code in ieee80211_tx_dequeue() will -propagate the stop from the interface (vif->txqs_stopped[]) -if the AC 2 (ieee80211_ac_from_tid(txq->tid)) is marked as -stopped. On wake, however, __ieee80211_wake_txqs() will wake -the TXQ if AC 0 (txq->ac) is woken up. - -If a driver stops all queues with ieee80211_stop_tx_queues() -and then wakes them again with ieee80211_wake_tx_queues(), -the ieee80211_wake_txqs() tasklet will run to resync queue -and TXQ state. If all queues were woken, then what'll happen -is that _ieee80211_wake_txqs() will run in order of HW queues -0-3, typically (and certainly for iwlwifi) corresponding to -ACs 0-3, so it'll call __ieee80211_wake_txqs() for each AC in -order 0-3. - -When __ieee80211_wake_txqs() is called for AC 0 (VO) that'll -wake up the management TXQ (remember its tid is 16), and the -driver's wake_tx_queue() will be called. That tries to get a -frame, which will immediately *stop* the TXQ again, because -now we check against AC 2, and AC 2 hasn't yet been marked as -woken up again in sdata->vif.txqs_stopped[] since we're only -in the __ieee80211_wake_txqs() call for AC 0. - -Thus, the management TXQ will never be started again. - -Fix this by checking txq->ac directly instead of calculating -the AC as ieee80211_ac_from_tid(txq->tid). - -Fixes: adf8ed01e4fd ("mac80211: add an optional TXQ for other PS-buffered frames") -Signed-off-by: Johannes Berg ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3589,7 +3589,7 @@ begin: - test_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txqi->flags)) - goto out; - -- if (vif->txqs_stopped[ieee80211_ac_from_tid(txq->tid)]) { -+ if (vif->txqs_stopped[txq->ac]) { - set_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txqi->flags); - goto out; - } diff --git a/package/kernel/mac80211/patches/subsys/374-mac80211-fix-time-is-after-bug-in-mlme.patch b/package/kernel/mac80211/patches/subsys/374-mac80211-fix-time-is-after-bug-in-mlme.patch deleted file mode 100644 index 0573aece64..0000000000 --- a/package/kernel/mac80211/patches/subsys/374-mac80211-fix-time-is-after-bug-in-mlme.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Ben Greear -Date: Tue, 30 Mar 2021 16:07:49 -0700 -Subject: [PATCH] mac80211: fix time-is-after bug in mlme - -The incorrect timeout check caused probing to happen when it did -not need to happen. This in turn caused tx performance drop -for around 5 seconds in ath10k-ct driver. Possibly that tx drop -is due to a secondary issue, but fixing the probe to not happen -when traffic is running fixes the symptom. - -Signed-off-by: Ben Greear -Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor") -Acked-by: Felix Fietkau -Link: https://lore.kernel.org/r/20210330230749.14097-1-greearb@candelatech.com -Signed-off-by: Johannes Berg ---- - ---- a/net/mac80211/mlme.c -+++ b/net/mac80211/mlme.c -@@ -4691,7 +4691,10 @@ static void ieee80211_sta_conn_mon_timer - timeout = sta->rx_stats.last_rx; - timeout += IEEE80211_CONNECTION_IDLE_TIME; - -- if (time_is_before_jiffies(timeout)) { -+ /* If timeout is after now, then update timer to fire at -+ * the later date, but do not actually probe at this time. -+ */ -+ if (time_is_after_jiffies(timeout)) { - mod_timer(&ifmgd->conn_mon_timer, round_jiffies_up(timeout)); - return; - } diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index 3d1bb3d6c8..5d5dcd51ad 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2707,6 +2707,19 @@ static int ieee80211_get_tx_power(struct +@@ -2709,6 +2709,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -4137,6 +4150,7 @@ const struct cfg80211_ops mac80211_confi +@@ -4139,6 +4152,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -129,7 +129,7 @@ local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -733,6 +733,7 @@ static const struct nla_policy nl80211_p +@@ -737,6 +737,7 @@ static const struct nla_policy nl80211_p [NL80211_ATTR_S1G_CAPABILITY_MASK] = NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), [NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT }, @@ -137,7 +137,7 @@ }; /* policy for the key attributes */ -@@ -3241,6 +3242,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3245,6 +3246,20 @@ static int nl80211_set_wiphy(struct sk_b if (result) return result; } From 454d514f4647d6f1f0d93d8f67abdef94cd66a7d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 2 May 2021 22:59:36 +0200 Subject: [PATCH 3/4] ltq-dsl-base: Make package nonshared to fix image builder This package depends on the lantiq target and is only build for that target. A normal package would be build by the SDK builder probably under a different target and then this package will not be selected. Mark it as nonshared to build it when the lantiq target gets build. Fixes: FS#3773, FS#3774 Signed-off-by: Hauke Mehrtens --- package/network/utils/ltq-dsl-base/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/network/utils/ltq-dsl-base/Makefile b/package/network/utils/ltq-dsl-base/Makefile index aae07bc299..2ff069ca4d 100644 --- a/package/network/utils/ltq-dsl-base/Makefile +++ b/package/network/utils/ltq-dsl-base/Makefile @@ -8,6 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ltq-dsl-base PKG_RELEASE:=3 +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/ltq-dsl-base From 3980daffa4e284377cd1ae803fba78331c1fc40b Mon Sep 17 00:00:00 2001 From: Alan Swanson Date: Tue, 27 Apr 2021 16:24:05 +0100 Subject: [PATCH 4/4] dnsmasq: Update to version 2.85 Fixes issue with merged DNS requests in 2.83/2.84 not being retried on the firsts failed request causing lookup failures. Also fixes the following security problem in dnsmasq: * CVE-2021-3448: If specifiying the source address or interface to be used when contacting upstream name servers such as: server=8.8.8.8@1.2.3.4, server=8.8.8.8@1.2.3.4#66 and server=8.8.8.8@eth0 then all would use the same socket bound to the explicitly configured port. Now only server=8.8.8.8@1.2.3.4#66 will use the explicitly configured port and the others random source ports. Remove upstreamed patches and update remaining patch. Signed-off-by: Alan Swanson [refreshed old runtime support patch] Signed-off-by: Kevin Darbyshire-Bryant --- package/network/services/dnsmasq/Makefile | 4 +- ...ak-sort-order-of-tags-in-get-version.patch | 45 ------------------- ...4a875e0f16fd645df965db346fc56d2ab1dd.patch | 28 ------------ ...00-remove-old-runtime-kernel-support.patch | 21 ++------- 4 files changed, 6 insertions(+), 92 deletions(-) delete mode 100644 package/network/services/dnsmasq/patches/0001-Tweak-sort-order-of-tags-in-get-version.patch delete mode 100644 package/network/services/dnsmasq/patches/0002-Tweak-f1204a875e0f16fd645df965db346fc56d2ab1dd.patch diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index bc70931400..90a81b5f65 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_UPSTREAM_VERSION:=2.84 +PKG_UPSTREAM_VERSION:=2.85 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_HASH:=603195c64b73137609b07e1024ae0b37f652b2f5fe467dce66985b3d1850050c +PKG_HASH:=ad98d3803df687e5b938080f3d25c628fe41c878752d03fbc6199787fee312fa PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/patches/0001-Tweak-sort-order-of-tags-in-get-version.patch b/package/network/services/dnsmasq/patches/0001-Tweak-sort-order-of-tags-in-get-version.patch deleted file mode 100644 index d7659ea037..0000000000 --- a/package/network/services/dnsmasq/patches/0001-Tweak-sort-order-of-tags-in-get-version.patch +++ /dev/null @@ -1,45 +0,0 @@ -From f1204a875e0f16fd645df965db346fc56d2ab1dd Mon Sep 17 00:00:00 2001 -From: Simon Kelley -Date: Fri, 29 Jan 2021 23:20:06 +0000 -Subject: [PATCH 1/2] Tweak sort order of tags in get-version. - -We want to sort such that the most recent/relevant tag is first -and gets used to set the compiled-in version. - -The solution is far from general, but works for the tag formats -used by dnsmasq. v2.84 sorts before v2.83, but v2.83 sorts -before v2.83rc1 and 2.83rc1 sorts before v2.83test1 - -Signed-off-by: Kevin Darbyshire-Bryant ---- - bld/get-version | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/bld/get-version b/bld/get-version -index e472aab..1d7e7f0 100755 ---- a/bld/get-version -+++ b/bld/get-version -@@ -9,7 +9,10 @@ - # If we can find one which matches $v[0-9].* then we assume it's - # a version-number tag, else we just use the whole string. - # If there is more than one v[0-9].* tag, sort them and use the --# first. This favours, eg v2.63 over 2.63rc6. -+# first. The insane arguments to the sort command are to ensure -+# that, eg v2.64 comes before v2.63, but v2.63 comes before v2.63rc1 -+# and v2.63rc1 comes before v2.63test1 -+ - - # Change directory to the toplevel source directory. - if test -z "$1" || ! test -d "$1" || ! cd "$1"; then -@@ -28,7 +31,7 @@ else - vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep ^v[0-9]` - - if [ $? -eq 0 ]; then -- echo "${vers}" | sort -r | head -n 1 | sed 's/^v//' -+ echo "${vers}" | sort -k1.2,1.5r -k 1.6,1.6 -k1.8,1.9r -k1.10,1.11r | head -n 1 | sed 's/^v//' - else - cat $1/VERSION - fi --- -2.24.3 (Apple Git-128) - diff --git a/package/network/services/dnsmasq/patches/0002-Tweak-f1204a875e0f16fd645df965db346fc56d2ab1dd.patch b/package/network/services/dnsmasq/patches/0002-Tweak-f1204a875e0f16fd645df965db346fc56d2ab1dd.patch deleted file mode 100644 index 255507ced9..0000000000 --- a/package/network/services/dnsmasq/patches/0002-Tweak-f1204a875e0f16fd645df965db346fc56d2ab1dd.patch +++ /dev/null @@ -1,28 +0,0 @@ -From cfcafdd27c74dc187fe96a9cfa88b1aef53540a0 Mon Sep 17 00:00:00 2001 -From: Simon Kelley -Date: Mon, 1 Feb 2021 23:46:43 +0000 -Subject: [PATCH 2/2] Tweak f1204a875e0f16fd645df965db346fc56d2ab1dd - -This gets, eg, v2.65test1 and v2.65test11 in the correct order. - -Signed-off-by: Kevin Darbyshire-Bryant ---- - bld/get-version | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bld/get-version b/bld/get-version -index 1d7e7f0..1f51768 100755 ---- a/bld/get-version -+++ b/bld/get-version -@@ -31,7 +31,7 @@ else - vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep ^v[0-9]` - - if [ $? -eq 0 ]; then -- echo "${vers}" | sort -k1.2,1.5r -k 1.6,1.6 -k1.8,1.9r -k1.10,1.11r | head -n 1 | sed 's/^v//' -+ echo "${vers}" | sort -k1.2,1.5Vr -k1.6,1.6 -k1.8,1.9Vr -k1.10,1.11Vr | head -n 1 | sed 's/^v//' - else - cat $1/VERSION - fi --- -2.24.3 (Apple Git-128) - diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index bd11806ae0..b601bce1a9 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -1,4 +1,4 @@ -From 7df4c681678612d196b4e1eec24963d181fdb28a Mon Sep 17 00:00:00 2001 +From 02fbe60e1c7e74d2ba57109575e7bfc238b1b5d4 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Sun, 5 Apr 2020 17:18:23 +0100 Subject: [PATCH] drop runtime old kernel support @@ -8,9 +8,8 @@ Signed-off-by: Kevin Darbyshire-Bryant src/dnsmasq.c | 4 ---- src/dnsmasq.h | 5 +--- src/ipset.c | 64 ++++----------------------------------------------- - src/netlink.c | 3 +-- src/util.c | 19 --------------- - 5 files changed, 6 insertions(+), 89 deletions(-) + 4 files changed, 5 insertions(+), 87 deletions(-) --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -27,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1125,7 +1125,7 @@ extern struct daemon { +@@ -1144,7 +1144,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -36,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1306,9 +1306,6 @@ int read_write(int fd, unsigned char *pa +@@ -1326,9 +1326,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); @@ -139,18 +138,6 @@ Signed-off-by: Kevin Darbyshire-Bryant if (ret == -1) my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); ---- a/src/netlink.c -+++ b/src/netlink.c -@@ -92,8 +92,7 @@ char *netlink_init(void) - iov.iov_len = 100; - iov.iov_base = safe_malloc(iov.iov_len); - -- if (daemon->kernel_version >= KERNEL_VERSION(2,6,30) && -- setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) -+ if (setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) - return _("warning: failed to set NETLINK_NO_ENOBUFS on netlink socket"); - - return NULL; --- a/src/util.c +++ b/src/util.c @@ -786,22 +786,3 @@ int wildcard_matchn(const char* wildcard