From f02920dd98188758113d4e44b97c95f07f7cde2a Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 17 Mar 2024 15:55:09 +0000 Subject: [PATCH 01/11] mvebu: enable thermal zone polling for IEI Puzzle devices Marvell's thermal sensors do not support interrupts, so we need to poll them. Reading temperature every second should be enough to control the fan. While at it, also make sure fan speed is reduced again if temperature goes down. Signed-off-by: Daniel Golle (cherry picked from commit fc177695e00e80afd30d20d29f6e915edc9e9eb9) --- .../arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi index 94677532f2..a8ce8fd102 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi @@ -1,4 +1,7 @@ #define PUZZLE_FAN_THERMAL(_cname, _fan) \ + polling-delay-passive = <500>; \ + polling-delay = <1000>; \ + \ trips { \ _cname##_active_high: cpu-active-high { \ temperature = <80000>; \ @@ -28,14 +31,14 @@ }; \ cpu-active-med { \ trip = <&_cname##_active_med>; \ - cooling-device = <_fan 2 THERMAL_NO_LIMIT>; \ + cooling-device = <_fan 2 3>; \ }; \ cpu-active-low { \ trip = <&_cname##_active_low>; \ - cooling-device = <_fan 1 THERMAL_NO_LIMIT>; \ + cooling-device = <_fan 1 2>; \ }; \ cpu-active-idle { \ trip = <&_cname##_active_idle>; \ - cooling-device = <_fan 0 THERMAL_NO_LIMIT>; \ + cooling-device = <_fan 0 0>; \ }; \ } From 0a571c9e77b381ff4ea4beb42113b5cd43144f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 17 Jan 2024 22:20:15 +0100 Subject: [PATCH 02/11] mediatek: filogic: replace built-in Aquantia driver with module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some Aquantia PHYs (e.g. AQR113C) require firmware to be uploaded by host system. With built-in drivers this doesn't work in OpenWrt / embeddded as filesystem isn't available during PHY probe. That results in delays like: [ 1.588068] Aquantia AQR113C mdio-bus:00: Falling back to sysfs fallback for: Rhe-05.06-Candidate9-AQR_Mediatek_23B_P5_ID45824_LCLVER1.cld [ 64.526387] Aquantia AQR113C mdio-bus:00: failed to find FW file Rhe-05.06-Candidate9-AQR_Mediatek_23B_P5_ID45824_LCLVER1.cld (-110) Switch to module to postpone PHY probe to init state. Signed-off-by: Rafał Miłecki (cherry picked from commit 3bd79e6136a572b73536e9216cc199399fb33b30) --- target/linux/mediatek/filogic/config-5.15 | 1 - target/linux/mediatek/filogic/target.mk | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/mediatek/filogic/config-5.15 b/target/linux/mediatek/filogic/config-5.15 index 8c46b9ad2c..fd05fdfb58 100644 --- a/target/linux/mediatek/filogic/config-5.15 +++ b/target/linux/mediatek/filogic/config-5.15 @@ -1,6 +1,5 @@ CONFIG_64BIT=y # CONFIG_AHCI_MTK is not set -CONFIG_AQUANTIA_PHY=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_ARCH_KEEP_MEMBLOCK=y CONFIG_ARCH_MEDIATEK=y diff --git a/target/linux/mediatek/filogic/target.mk b/target/linux/mediatek/filogic/target.mk index dd4c4c1448..182b229db2 100644 --- a/target/linux/mediatek/filogic/target.mk +++ b/target/linux/mediatek/filogic/target.mk @@ -2,7 +2,7 @@ ARCH:=aarch64 SUBTARGET:=filogic BOARDNAME:=Filogic 8x0 (MT798x) CPU_TYPE:=cortex-a53 -DEFAULT_PACKAGES += kmod-crypto-hw-safexcel kmod-mt7915e wpad-basic-mbedtls uboot-envtools +DEFAULT_PACKAGES += kmod-phy-aquantia kmod-crypto-hw-safexcel kmod-mt7915e wpad-basic-mbedtls uboot-envtools KERNELNAME:=Image dtbs define Target/Description From af22a169c1e480b991eb8c4e69674bf5846d6215 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 18 Nov 2023 16:29:09 +0100 Subject: [PATCH 03/11] dnsmasq: mark global ubus context as closed after fork If the dnsmasq process forks to handle TCP connections, it closes the ubus context. But instead of changing the daemon wide pointer to NULL, only the local variable was adjusted - and this portion of the code was even dropped (dead store) by some optimizing compilers. It makes more sense to change the daemon->ubus pointer because various functions are already checking it for NULL. It is also the behavior which ubus_destroy() implements. Fixes: d8b33dad0bb7 ("dnsmasq: add support for monitoring and modifying dns lookup results via ubus") Signed-off-by: Sven Eckelmann (cherry picked from commit 711dcb77630e96e75413b5cdbe3ddb5432f394f6) --- package/network/services/dnsmasq/patches/200-ubus_dns.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/dnsmasq/patches/200-ubus_dns.patch b/package/network/services/dnsmasq/patches/200-ubus_dns.patch index 8a70bb8bdf..ccbe70ab9c 100644 --- a/package/network/services/dnsmasq/patches/200-ubus_dns.patch +++ b/package/network/services/dnsmasq/patches/200-ubus_dns.patch @@ -210,7 +210,7 @@ + return; + + ubus_free(ubus); -+ ubus = NULL; ++ daemon->ubus = NULL; +} + static int ubus_handle_metrics(struct ubus_context *ctx, struct ubus_object *obj, From 875822f283163c038c93fd5405c6dd9796228eb7 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sun, 18 Feb 2024 13:12:10 +0000 Subject: [PATCH 04/11] dnsmasq: version 2.90 Bump to 2.90 to get upstream's fix for DNSSEC KeyTrap (CVE-2023-50387, CVE-2023-50868) among many other goodies and fixes (notably, upstream 568fb024... fixes a UAF in cache_remove_uid that was routinely crashing dnsmasq in my deployment). Catch up our 200-ubus_dns.patch, too. Signed-off-by: Nathaniel Wesley Filardo (cherry picked from commit 838a27f64f56e75aae98a3ab2556856224d48d8b) --- package/network/services/dnsmasq/Makefile | 4 +- .../dnsmasq/patches/200-ubus_dns.patch | 118 +++++++++--------- 2 files changed, 64 insertions(+), 58 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 4272398a92..47a5ae54ae 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.89 +PKG_UPSTREAM_VERSION:=2.90 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/ -PKG_HASH:=02bd230346cf0b9d5909f5e151df168b2707103785eb616b56685855adebb609 +PKG_HASH:=8e50309bd837bfec9649a812e066c09b6988b73d749b7d293c06c57d46a109e4 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/patches/200-ubus_dns.patch b/package/network/services/dnsmasq/patches/200-ubus_dns.patch index ccbe70ab9c..c1694d5551 100644 --- a/package/network/services/dnsmasq/patches/200-ubus_dns.patch +++ b/package/network/services/dnsmasq/patches/200-ubus_dns.patch @@ -1,6 +1,23 @@ +diff --git a/src/dnsmasq.c b/src/dnsmasq.c +index 30fb419..776351a 100644 +--- a/src/dnsmasq.c ++++ b/src/dnsmasq.c +@@ -2025,6 +2025,10 @@ static void check_dns_listeners(time_t now) + daemon->pipe_to_parent = pipefd[1]; + } + ++#ifdef HAVE_UBUS ++ drop_ubus_listeners(); ++#endif ++ + /* start with no upstream connections. */ + for (s = daemon->servers; s; s = s->next) + s->tcpfd = -1; +diff --git a/src/dnsmasq.h b/src/dnsmasq.h +index e455c3f..c84ba48 100644 --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1631,14 +1631,26 @@ void emit_dbus_signal(int action, struct +@@ -1673,14 +1673,26 @@ void emit_dbus_signal(int action, struct dhcp_lease *lease, char *hostname); /* ubus.c */ #ifdef HAVE_UBUS @@ -11,6 +28,7 @@ void set_ubus_listeners(void); void check_ubus_listeners(void); +void drop_ubus_listeners(void); ++int ubus_dns_notify_has_subscribers(void); +struct blob_buf *ubus_dns_notify_prepare(void); +int ubus_dns_notify(const char *type, ubus_dns_notify_cb cb, void *priv); void ubus_event_bcast(const char *type, const char *mac, const char *ip, const char *name, const char *interface); @@ -19,14 +37,28 @@ void ubus_event_bcast_connmark_allowlist_resolved(u32 mark, const char *pattern, const char *ip, u32 ttl); # endif +#else -+struct blob_buf; -+static inline struct blob_buf *ubus_dns_notify_prepare(void) ++static inline int ubus_dns_notify_has_subscribers(void) +{ -+ return NULL; ++ return 0; +} #endif /* ipset.c */ +diff --git a/src/forward.c b/src/forward.c +index 32f37e4..3d28963 100644 +--- a/src/forward.c ++++ b/src/forward.c +@@ -803,7 +803,7 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server + cache_secure = 0; + } + +- if (daemon->doctors && do_doctor(header, n, daemon->namebuff)) ++ if ((daemon->doctors || ubus_dns_notify_has_subscribers()) && do_doctor(header, n, daemon->namebuff)) + cache_secure = 0; + + /* check_for_bogus_wildcard() does it's own caching, so +diff --git a/src/rfc1035.c b/src/rfc1035.c +index 387d894..7bf7967 100644 --- a/src/rfc1035.c +++ b/src/rfc1035.c @@ -13,8 +13,10 @@ @@ -41,7 +73,7 @@ int extract_name(struct dns_header *header, size_t plen, unsigned char **pp, char *name, int isExtract, int extrabytes) -@@ -394,9 +396,64 @@ static int private_net6(struct in6_addr +@@ -384,10 +386,65 @@ static int private_net6(struct in6_addr *a, int ban_localhost) ((u32 *)a)[0] == htonl(0x20010db8); /* RFC 6303 4.6 */ } @@ -100,14 +132,15 @@ +} +#endif + - static unsigned char *do_doctor(unsigned char *p, int count, struct dns_header *header, size_t qlen, int *doctored) + int do_doctor(struct dns_header *header, size_t qlen, char *namebuff) { + unsigned char *p; - int i, qtype, qclass, rdlen; + int i, qtype, qclass, rdlen, ttl; - - for (i = count; i != 0; i--) - { -@@ -405,7 +462,7 @@ static unsigned char *do_doctor(unsigned + int done = 0; + + if (!(p = skip_questions(header, qlen))) +@@ -404,7 +461,7 @@ int do_doctor(struct dns_header *header, size_t qlen, char *namebuff) GETSHORT(qtype, p); GETSHORT(qclass, p); @@ -116,53 +149,36 @@ GETSHORT(rdlen, p); if (qclass == C_IN && qtype == T_A) -@@ -416,6 +473,9 @@ static unsigned char *do_doctor(unsigned +@@ -415,6 +472,9 @@ int do_doctor(struct dns_header *header, size_t qlen, char *namebuff) if (!CHECK_LEN(header, p, qlen, INADDRSZ)) - return 0; + return done; + if (ubus_dns_doctor(daemon->namebuff, ttl, p, AF_INET)) -+ *doctored = 1; ++ header->hb3 &= ~HB3_AA; + /* alignment */ - memcpy(&addr, p, INADDRSZ); + memcpy(&addr.addr4, p, INADDRSZ); -@@ -433,13 +493,22 @@ static unsigned char *do_doctor(unsigned - addr.s_addr &= ~doctor->mask.s_addr; - addr.s_addr |= (doctor->out.s_addr & doctor->mask.s_addr); - /* Since we munged the data, the server it came from is no longer authoritative */ -- header->hb3 &= ~HB3_AA; - *doctored = 1; - memcpy(p, &addr, INADDRSZ); +@@ -444,6 +504,14 @@ int do_doctor(struct dns_header *header, size_t qlen, char *namebuff) break; } } -- + else if (qclass == C_IN && qtype == T_AAAA) + { + if (!CHECK_LEN(header, p, qlen, IN6ADDRSZ)) + return 0; + + if (ubus_dns_doctor(daemon->namebuff, ttl, p, AF_INET6)) -+ *doctored = 1; ++ header->hb3 &= ~HB3_AA; + } -+ -+ if (*doctored) -+ header->hb3 &= ~HB3_AA; + if (!ADD_RDLEN(header, p, qlen, rdlen)) - return 0; /* bad packet */ - } -@@ -570,7 +639,7 @@ int extract_addresses(struct dns_header - cache_start_insert(); - - /* find_soa is needed for dns_doctor side effects, so don't call it lazily if there are any. */ -- if (daemon->doctors || option_bool(OPT_DNSSEC_VALID)) -+ if (daemon->doctors || option_bool(OPT_DNSSEC_VALID) || ubus_dns_notify_prepare()) - { - searched_soa = 1; - ttl = find_soa(header, qlen, doctored); + return done; /* bad packet */ +diff --git a/src/ubus.c b/src/ubus.c +index a5758e7..f2a75a8 100644 --- a/src/ubus.c +++ b/src/ubus.c -@@ -72,6 +72,13 @@ static struct ubus_object ubus_object = +@@ -72,6 +72,13 @@ static struct ubus_object ubus_object = { .subscribe_cb = ubus_subscribe_cb, }; @@ -176,7 +192,7 @@ static void ubus_subscribe_cb(struct ubus_context *ctx, struct ubus_object *obj) { (void)ctx; -@@ -105,13 +112,21 @@ static void ubus_disconnect_cb(struct ub +@@ -105,13 +112,21 @@ static void ubus_disconnect_cb(struct ubus_context *ubus) char *ubus_init() { struct ubus_context *ubus = NULL; @@ -216,15 +232,18 @@ static int ubus_handle_metrics(struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req, const char *method, struct blob_attr *msg) -@@ -328,6 +354,50 @@ fail: +@@ -328,6 +354,53 @@ fail: } \ } while (0) ++int ubus_dns_notify_has_subscribers(void) ++{ ++ return (daemon->ubus && ubus_dns_object.has_subscribers); ++} ++ +struct blob_buf *ubus_dns_notify_prepare(void) +{ -+ struct ubus_context *ubus = (struct ubus_context *)daemon->ubus; -+ -+ if (!ubus || !ubus_dns_object.has_subscribers) ++ if (!ubus_dns_notify_has_subscribers()) + return NULL; + + blob_buf_init(&b, 0); @@ -267,16 +286,3 @@ void ubus_event_bcast(const char *type, const char *mac, const char *ip, const char *name, const char *interface) { struct ubus_context *ubus = (struct ubus_context *)daemon->ubus; ---- a/src/dnsmasq.c -+++ b/src/dnsmasq.c -@@ -2003,6 +2003,10 @@ static void check_dns_listeners(time_t n - daemon->pipe_to_parent = pipefd[1]; - } - -+#ifdef HAVE_UBUS -+ drop_ubus_listeners(); -+#endif -+ - /* start with no upstream connections. */ - for (s = daemon->servers; s; s = s->next) - s->tcpfd = -1; From 853b638f8584a658214220fea770b2715621f826 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 13 Mar 2024 12:47:31 +0100 Subject: [PATCH 05/11] dnsmasq: reset PKG_RELEASE dnsmasq was recently updated to 2.90, but PKG_RELEASE was not reset to 1. Fixes: 838a27f64f56 ("dnsmasq: version 2.90") Signed-off-by: Robert Marko (cherry picked from commit 694e6477848eade21851ec27d90c173b373099fc) --- package/network/services/dnsmasq/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 47a5ae54ae..9020278d53 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_UPSTREAM_VERSION:=2.90 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) -PKG_RELEASE:=4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/ From 03a3a729ec96b5c31cad5f03cd2c3d1a0b4c471f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 18 Mar 2024 22:39:56 +0100 Subject: [PATCH 06/11] dnsmasq: Backport 2 upstream patches These two patches are fixing minor problems with DNSSEC found shortly after the dnsmasq 2.90 release. Signed-off-by: Hauke Mehrtens (cherry picked from commit 28c87d7ecd142a31772572faac079b77163ceeca) --- package/network/services/dnsmasq/Makefile | 2 +- ...ous-resource-limit-exceeded-messages.patch | 43 +++++++++++++++++++ ...introduced-in-51471cafa5a4fa44d6fe49.patch | 31 +++++++++++++ ...00-remove-old-runtime-kernel-support.patch | 8 ++-- .../dnsmasq/patches/200-ubus_dns.patch | 28 ++++-------- 5 files changed, 88 insertions(+), 24 deletions(-) create mode 100644 package/network/services/dnsmasq/patches/0001-Fix-spurious-resource-limit-exceeded-messages.patch create mode 100644 package/network/services/dnsmasq/patches/0002-PATCH-Fix-error-introduced-in-51471cafa5a4fa44d6fe49.patch diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 9020278d53..5224e996a4 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_UPSTREAM_VERSION:=2.90 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/ diff --git a/package/network/services/dnsmasq/patches/0001-Fix-spurious-resource-limit-exceeded-messages.patch b/package/network/services/dnsmasq/patches/0001-Fix-spurious-resource-limit-exceeded-messages.patch new file mode 100644 index 0000000000..f25ee20413 --- /dev/null +++ b/package/network/services/dnsmasq/patches/0001-Fix-spurious-resource-limit-exceeded-messages.patch @@ -0,0 +1,43 @@ +From 1ed783b8d7343c42910a61f12a8fc6237eb80417 Mon Sep 17 00:00:00 2001 +From: Simon Kelley +Date: Mon, 19 Feb 2024 12:22:43 +0000 +Subject: Fix spurious "resource limit exceeded" messages. + +Replies from upstream with a REFUSED rcode can result in +log messages stating that a resource limit has been exceeded, +which is not the case. + +Thanks to Dominik Derigs and the Pi-hole project for +spotting this. +--- + CHANGELOG | 5 +++++ + src/forward.c | 6 +++--- + 2 files changed, 8 insertions(+), 3 deletions(-) + +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -1,3 +1,8 @@ ++version 2.91 ++ Fix spurious "resource limit exceeded messages". Thanks to ++ Dominik Derigs for the bug report. ++ ++ + version 2.90 + Fix reversion in --rev-server introduced in 2.88 which + caused breakage if the prefix length is not exactly divisible +--- a/src/forward.c ++++ b/src/forward.c +@@ -937,10 +937,10 @@ static void dnssec_validate(struct frec + status = dnssec_validate_reply(now, header, plen, daemon->namebuff, daemon->keyname, &forward->class, + !option_bool(OPT_DNSSEC_IGN_NS) && (forward->sentto->flags & SERV_DO_DNSSEC), + NULL, NULL, NULL, &orig->validate_counter); +- } + +- if (STAT_ISEQUAL(status, STAT_ABANDONED)) +- log_resource = 1; ++ if (STAT_ISEQUAL(status, STAT_ABANDONED)) ++ log_resource = 1; ++ } + + /* Can't validate, as we're missing key data. Put this + answer aside, whilst we get that. */ diff --git a/package/network/services/dnsmasq/patches/0002-PATCH-Fix-error-introduced-in-51471cafa5a4fa44d6fe49.patch b/package/network/services/dnsmasq/patches/0002-PATCH-Fix-error-introduced-in-51471cafa5a4fa44d6fe49.patch new file mode 100644 index 0000000000..5c50ae8446 --- /dev/null +++ b/package/network/services/dnsmasq/patches/0002-PATCH-Fix-error-introduced-in-51471cafa5a4fa44d6fe49.patch @@ -0,0 +1,31 @@ +From ccff85ad72d2f858d9743d40525128e4f62d41a8 Mon Sep 17 00:00:00 2001 +From: renmingshuai +Date: Wed, 21 Feb 2024 00:24:25 +0000 +Subject: [PATCH] Fix error introduced in + 51471cafa5a4fa44d6fe490885d9910bd72a5907 + +Signed-off-by: renmingshuai +--- + src/dnssec.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/dnssec.c ++++ b/src/dnssec.c +@@ -1547,7 +1547,7 @@ static int prove_non_existence_nsec3(str + nsecs[i] = NULL; /* Speculative, will be restored if OK. */ + + if (!(p = skip_name(nsec3p, header, plen, 15))) +- return 0; /* bad packet */ ++ return DNSSEC_FAIL_BADPACKET; /* bad packet */ + + p += 10; /* type, class, TTL, rdlen */ + +@@ -1640,7 +1640,7 @@ static int prove_non_existence_nsec3(str + if (!wildname) + { + if (!(wildcard = strchr(next_closest, '.')) || wildcard == next_closest) +- return 0; ++ return DNSSEC_FAIL_NONSEC; + + wildcard--; + *wildcard = '*'; 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 59b8d02c0e..26c1b463b9 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 @@ -13,7 +13,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.c +++ b/src/dnsmasq.c -@@ -103,10 +103,6 @@ int main (int argc, char **argv) +@@ -105,10 +105,6 @@ int main (int argc, char **argv) read_opts(argc, argv, compile_opts); @@ -26,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1248,7 +1248,7 @@ extern struct daemon { +@@ -1277,7 +1277,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -35,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1453,9 +1453,6 @@ int read_write(int fd, unsigned char *pa +@@ -1491,9 +1491,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); @@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); --- a/src/util.c +++ b/src/util.c -@@ -855,22 +855,3 @@ int wildcard_matchn(const char* wildcard +@@ -866,22 +866,3 @@ int wildcard_matchn(const char* wildcard return (!num) || (*wildcard == *match); } diff --git a/package/network/services/dnsmasq/patches/200-ubus_dns.patch b/package/network/services/dnsmasq/patches/200-ubus_dns.patch index c1694d5551..72acbaeba9 100644 --- a/package/network/services/dnsmasq/patches/200-ubus_dns.patch +++ b/package/network/services/dnsmasq/patches/200-ubus_dns.patch @@ -1,8 +1,6 @@ -diff --git a/src/dnsmasq.c b/src/dnsmasq.c -index 30fb419..776351a 100644 --- a/src/dnsmasq.c +++ b/src/dnsmasq.c -@@ -2025,6 +2025,10 @@ static void check_dns_listeners(time_t now) +@@ -2021,6 +2021,10 @@ static void check_dns_listeners(time_t n daemon->pipe_to_parent = pipefd[1]; } @@ -13,11 +11,9 @@ index 30fb419..776351a 100644 /* start with no upstream connections. */ for (s = daemon->servers; s; s = s->next) s->tcpfd = -1; -diff --git a/src/dnsmasq.h b/src/dnsmasq.h -index e455c3f..c84ba48 100644 --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1673,14 +1673,26 @@ void emit_dbus_signal(int action, struct dhcp_lease *lease, char *hostname); +@@ -1670,14 +1670,26 @@ void emit_dbus_signal(int action, struct /* ubus.c */ #ifdef HAVE_UBUS @@ -44,11 +40,9 @@ index e455c3f..c84ba48 100644 #endif /* ipset.c */ -diff --git a/src/forward.c b/src/forward.c -index 32f37e4..3d28963 100644 --- a/src/forward.c +++ b/src/forward.c -@@ -803,7 +803,7 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server +@@ -803,7 +803,7 @@ static size_t process_reply(struct dns_h cache_secure = 0; } @@ -57,8 +51,6 @@ index 32f37e4..3d28963 100644 cache_secure = 0; /* check_for_bogus_wildcard() does it's own caching, so -diff --git a/src/rfc1035.c b/src/rfc1035.c -index 387d894..7bf7967 100644 --- a/src/rfc1035.c +++ b/src/rfc1035.c @@ -13,8 +13,10 @@ @@ -73,7 +65,7 @@ index 387d894..7bf7967 100644 int extract_name(struct dns_header *header, size_t plen, unsigned char **pp, char *name, int isExtract, int extrabytes) -@@ -384,10 +386,65 @@ static int private_net6(struct in6_addr *a, int ban_localhost) +@@ -384,10 +386,65 @@ static int private_net6(struct in6_addr ((u32 *)a)[0] == htonl(0x20010db8); /* RFC 6303 4.6 */ } @@ -140,7 +132,7 @@ index 387d894..7bf7967 100644 int done = 0; if (!(p = skip_questions(header, qlen))) -@@ -404,7 +461,7 @@ int do_doctor(struct dns_header *header, size_t qlen, char *namebuff) +@@ -404,7 +461,7 @@ int do_doctor(struct dns_header *header, GETSHORT(qtype, p); GETSHORT(qclass, p); @@ -149,7 +141,7 @@ index 387d894..7bf7967 100644 GETSHORT(rdlen, p); if (qclass == C_IN && qtype == T_A) -@@ -415,6 +472,9 @@ int do_doctor(struct dns_header *header, size_t qlen, char *namebuff) +@@ -415,6 +472,9 @@ int do_doctor(struct dns_header *header, if (!CHECK_LEN(header, p, qlen, INADDRSZ)) return done; @@ -159,7 +151,7 @@ index 387d894..7bf7967 100644 /* alignment */ memcpy(&addr.addr4, p, INADDRSZ); -@@ -444,6 +504,14 @@ int do_doctor(struct dns_header *header, size_t qlen, char *namebuff) +@@ -444,6 +504,14 @@ int do_doctor(struct dns_header *header, break; } } @@ -174,11 +166,9 @@ index 387d894..7bf7967 100644 if (!ADD_RDLEN(header, p, qlen, rdlen)) return done; /* bad packet */ -diff --git a/src/ubus.c b/src/ubus.c -index a5758e7..f2a75a8 100644 --- a/src/ubus.c +++ b/src/ubus.c -@@ -72,6 +72,13 @@ static struct ubus_object ubus_object = { +@@ -72,6 +72,13 @@ static struct ubus_object ubus_object = .subscribe_cb = ubus_subscribe_cb, }; @@ -192,7 +182,7 @@ index a5758e7..f2a75a8 100644 static void ubus_subscribe_cb(struct ubus_context *ctx, struct ubus_object *obj) { (void)ctx; -@@ -105,13 +112,21 @@ static void ubus_disconnect_cb(struct ubus_context *ubus) +@@ -105,13 +112,21 @@ static void ubus_disconnect_cb(struct ub char *ubus_init() { struct ubus_context *ubus = NULL; From a8f51096ddaf97e9e2b9a837368056099a593c41 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 10 Mar 2024 23:14:33 +0000 Subject: [PATCH 07/11] mediatek: mt7622: linksys-e8450: set driving strength for SPI-NAND Set 12mA driving strength for SPI-NAND pins like the stock firmware's bootloader does as well. Signed-off-by: Daniel Golle (cherry picked from commit 45a2109353fa18701b65aefe2323ec06391da543) --- target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi index abac02a72d..360a1711f9 100644 --- a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi +++ b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi @@ -1,8 +1,9 @@ // SPDX-License-Identifier: (GPL-2.0-only OR MIT) /dts-v1/; -#include #include +#include +#include #include "mt7622.dtsi" #include "mt6380.dtsi" @@ -275,6 +276,11 @@ function = "flash"; groups = "snfi"; }; + + conf { + groups = "snfi"; + drive-strength = ; + }; }; spic0_pins: spic0-pins { From 5ef41b1f915999d99cfb7099d0780bcdffbf8f37 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 16 Feb 2024 23:12:00 +0100 Subject: [PATCH 08/11] mt76: update to latest HEAD f1e1e67d wifi: mt76: fix race condition related to checking tx queue fill status bbbac7de wifi: mt76: rename mt76_packet_id_init/flush to mt76_wcid_init/cleanup b5d13611 mt76: mt7915: fix monitor mode issues Signed-off-by: David Bauer --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index c31631e6e5..c66a3988ad 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-08-14 -PKG_SOURCE_VERSION:=b14c2351ddb8601c322576d84029e463d456caef -PKG_MIRROR_HASH:=62b5e157ad525424b6857e77ed373e8d39d03af71b057f8b309d8b293d6eac5f +PKG_SOURCE_DATE:=2023-09-11 +PKG_SOURCE_VERSION:=f1e1e67d97d1e9a8bb01b59ab20c45ebc985a958 +PKG_MIRROR_HASH:=884c90d25d59609f86eeeb6d2bd0f9b8befba2bd0552a6c776cbae80be76503c PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 From 234f1a2efa558074dfa29382cf86f0024d71c524 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 22 Mar 2024 23:09:42 +0100 Subject: [PATCH 09/11] mt76: Fix PKG_MIRROR_HASH Fix the PKG_MIRROR_HASH after the last upgrade. Fixes: 5ef41b1f9159 ("mt76: update to latest HEAD") Signed-off-by: Hauke Mehrtens --- package/kernel/mt76/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index c66a3988ad..b0c096b8fb 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -10,7 +10,7 @@ PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2023-09-11 PKG_SOURCE_VERSION:=f1e1e67d97d1e9a8bb01b59ab20c45ebc985a958 -PKG_MIRROR_HASH:=884c90d25d59609f86eeeb6d2bd0f9b8befba2bd0552a6c776cbae80be76503c +PKG_MIRROR_HASH:=41fde79de5bec3aaafdb64658475a1fa99bc483b8122e6aad9b2aa8aa8edfce6 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 From 01170d518da1c8ade9d26e56d0135d12cda8e781 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 22 Mar 2024 23:26:03 +0100 Subject: [PATCH 10/11] OpenWrt v23.05.3: adjust config defaults Signed-off-by: Hauke Mehrtens --- feeds.conf.default | 8 ++++---- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 + version.date | 1 + 5 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 version create mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index d467db5627..45ab752893 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,4 @@ -src-git packages https://git.openwrt.org/feed/packages.git;openwrt-23.05 -src-git luci https://git.openwrt.org/project/luci.git;openwrt-23.05 -src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05 -src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-23.05 +src-git packages https://git.openwrt.org/feed/packages.git^063b2393cbc3e5aab9d2b40b2911cab1c3967c59 +src-git luci https://git.openwrt.org/project/luci.git^b07cf9dcfc37e021e5619a41c847e63afbd5d34a +src-git routing https://git.openwrt.org/feed/routing.git^648753932d5a7deff7f2bdb33c000018a709ad84 +src-git telephony https://git.openwrt.org/feed/telephony.git^86af194d03592121f5321474ec9918dd109d3057 diff --git a/include/version.mk b/include/version.mk index 924bf83541..58c51b4b79 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05-SNAPSHOT) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05.3) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r23809-234f1a2efa) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05-SNAPSHOT) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05.3) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 9a72863813..f48dedd5fc 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -190,7 +190,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.openwrt.org/releases/23.05-SNAPSHOT" + default "https://downloads.openwrt.org/releases/23.05.3" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -266,7 +266,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default y + default n help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version new file mode 100644 index 0000000000..ffbfa772e9 --- /dev/null +++ b/version @@ -0,0 +1 @@ +r23809-234f1a2efa diff --git a/version.date b/version.date new file mode 100644 index 0000000000..e1e962239b --- /dev/null +++ b/version.date @@ -0,0 +1 @@ +1711145382 From 2b61e258b4f95027dfc4babfa13a1d68fae27ff0 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 22 Mar 2024 23:26:12 +0100 Subject: [PATCH 11/11] OpenWrt v23.05.3: revert to branch defaults Signed-off-by: Hauke Mehrtens --- feeds.conf.default | 8 ++++---- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 - version.date | 1 - 5 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 version delete mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index 45ab752893..d467db5627 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,4 @@ -src-git packages https://git.openwrt.org/feed/packages.git^063b2393cbc3e5aab9d2b40b2911cab1c3967c59 -src-git luci https://git.openwrt.org/project/luci.git^b07cf9dcfc37e021e5619a41c847e63afbd5d34a -src-git routing https://git.openwrt.org/feed/routing.git^648753932d5a7deff7f2bdb33c000018a709ad84 -src-git telephony https://git.openwrt.org/feed/telephony.git^86af194d03592121f5321474ec9918dd109d3057 +src-git packages https://git.openwrt.org/feed/packages.git;openwrt-23.05 +src-git luci https://git.openwrt.org/project/luci.git;openwrt-23.05 +src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05 +src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-23.05 diff --git a/include/version.mk b/include/version.mk index 58c51b4b79..924bf83541 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05.3) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05-SNAPSHOT) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r23809-234f1a2efa) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05.3) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05-SNAPSHOT) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index f48dedd5fc..9a72863813 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -190,7 +190,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.openwrt.org/releases/23.05.3" + default "https://downloads.openwrt.org/releases/23.05-SNAPSHOT" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -266,7 +266,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default n + default y help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version deleted file mode 100644 index ffbfa772e9..0000000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -r23809-234f1a2efa diff --git a/version.date b/version.date deleted file mode 100644 index e1e962239b..0000000000 --- a/version.date +++ /dev/null @@ -1 +0,0 @@ -1711145382