Skip to content

Commit 830b482

Browse files
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: kernel: netfilter: Add nf_tproxy_ipv{4,6} and nf_socket_ipv{4,6} kernel: bump 5.10 to 5.10.142 (coolsnowwolf#10084) dnsmasq: add patch for DHCPv6 to honor IPv6 address on MAC address toolchain: Use GCC 8 by default for mips target ntfs3-mount: drop ntfs3-oot fs: port ntfs3 from kernel 5.19 to 5.10 fs: port ntfs3 from kernel 5.19 to 5.4
2 parents a885b11 + 9c0a733 commit 830b482

File tree

92 files changed

+61833
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+61833
-76
lines changed

include/kernel-5.10

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.10 = .138
2-
LINUX_KERNEL_HASH-5.10.138 = 29a003bb8e0e3a45942f703370fb0b3460e6fdcbbad37424423c9cf831ab5ba8
1+
LINUX_VERSION-5.10 = .142
2+
LINUX_KERNEL_HASH-5.10.142 = 3f47ebdb9afe152a0c32c1157336ef13fa5cc08ac6d884dfc1f6ddc2b7dba268

include/netfilter.mk

+6
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,12 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_IPV6, $(P_V6)nft_fib
355355

356356
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_QUEUE,CONFIG_NFT_QUEUE, $(P_XT)nft_queue),))
357357

358+
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_SOCKET,CONFIG_NFT_SOCKET, $(P_XT)nft_socket),))
359+
360+
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_TPROXY,CONFIG_NFT_TPROXY, $(P_XT)nft_tproxy),))
361+
362+
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_COMPAT,CONFIG_NFT_COMPAT, $(P_XT)nft_compat),))
363+
358364
# userland only
359365
IPT_BUILTIN += $(NF_IPT-y) $(NF_IPT-m)
360366
IPT_BUILTIN += $(IPT_CORE-y) $(IPT_CORE-m)

package/kernel/linux/modules/fs.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ $(eval $(call KernelPackage,fs-ntfs))
530530
define KernelPackage/fs-ntfs3
531531
SUBMENU:=$(FS_MENU)
532532
TITLE:=NTFS3 Read-Write file system support
533-
DEPENDS:=@(LINUX_5_15||LINUX_5_19) +kmod-nls-base
533+
DEPENDS:=@(LINUX_5_4||LINUX_5_10||LINUX_5_15||LINUX_5_19) +kmod-nls-base
534534
KCONFIG:= \
535535
CONFIG_NTFS3_FS \
536536
CONFIG_NTFS3_64BIT_CLUSTER=y \

package/kernel/linux/modules/netfilter.mk

+64
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,26 @@ endef
161161

162162
$(eval $(call KernelPackage,nf-flow))
163163

164+
define KernelPackage/nf-socket
165+
SUBMENU:=$(NF_MENU)
166+
TITLE:=Netfilter socket lookup support
167+
KCONFIG:= $(KCOFNIG_NF_SOCKET)
168+
FILES:=$(foreach mod,$(NF_SOCKET-m),$(LINUX_DIR)/net/$(mod).ko)
169+
AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_SOCKET-m)))
170+
endef
171+
172+
$(eval $(call KernelPackage,nf-socket))
173+
174+
175+
define KernelPackage/nf-tproxy
176+
SUBMENU:=$(NF_MENU)
177+
TITLE:=Netfilter tproxy support
178+
KCONFIG:= $(KCOFNIG_NF_TPROXY)
179+
FILES:=$(foreach mod,$(NF_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
180+
AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_TPROXY-m)))
181+
endef
182+
183+
$(eval $(call KernelPackage,nf-tproxy))
164184

165185
define AddDepends/ipt
166186
SUBMENU:=$(NF_MENU)
@@ -1179,3 +1199,47 @@ define KernelPackage/nft-queue
11791199
endef
11801200

11811201
$(eval $(call KernelPackage,nft-queue))
1202+
1203+
define KernelPackage/nft-socket
1204+
SUBMENU:=$(NF_MENU)
1205+
TITLE:=Netfilter nf_tables socket support
1206+
DEPENDS:=+kmod-nft-core +kmod-nf-socket
1207+
FILES:=$(foreach mod,$(NFT_SOCKET-m),$(LINUX_DIR)/net/$(mod).ko)
1208+
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_SOCKET-m)))
1209+
KCONFIG:=$(KCONFIG_NFT_SOCKET)
1210+
endef
1211+
1212+
$(eval $(call KernelPackage,nft-socket))
1213+
1214+
define KernelPackage/nft-tproxy
1215+
SUBMENU:=$(NF_MENU)
1216+
TITLE:=Netfilter nf_tables tproxy support
1217+
DEPENDS:=+kmod-nft-core +kmod-nf-tproxy +kmod-nf-conntrack
1218+
FILES:=$(foreach mod,$(NFT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
1219+
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_TPROXY-m)))
1220+
KCONFIG:=$(KCONFIG_NFT_TPROXY)
1221+
endef
1222+
1223+
$(eval $(call KernelPackage,nft-tproxy))
1224+
1225+
define KernelPackage/nft-compat
1226+
SUBMENU:=$(NF_MENU)
1227+
TITLE:=Netfilter nf_tables compat support
1228+
DEPENDS:=+kmod-nft-core +kmod-nf-ipt
1229+
FILES:=$(foreach mod,$(NFT_COMPAT-m),$(LINUX_DIR)/net/$(mod).ko)
1230+
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_COMPAT-m)))
1231+
KCONFIG:=$(KCONFIG_NFT_COMPAT)
1232+
endef
1233+
1234+
$(eval $(call KernelPackage,nft-compat))
1235+
1236+
define KernelPackage/nft-xfrm
1237+
SUBMENU:=$(NF_MENU)
1238+
TITLE:=Netfilter nf_tables xfrm support (ipsec)
1239+
DEPENDS:=+kmod-nft-core
1240+
FILES:=$(foreach mod,$(NFT_XFRM-m),$(LINUX_DIR)/net/$(mod).ko)
1241+
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_XFRM-m)))
1242+
KCONFIG:=$(KCONFIG_NFT_XFRM)
1243+
endef
1244+
1245+
$(eval $(call KernelPackage,nft-xfrm))

package/lean/ntfs3-mount/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ define Package/ntfs3-mount
1010
CATEGORY:=Utilities
1111
SUBMENU:=Filesystem
1212
TITLE:=NTFS mount script for Paragon NTFS3 driver
13-
DEPENDS:=+LINUX_5_4:kmod-fs-ntfs3-oot +(LINUX_5_15||LINUX_5_19):kmod-fs-ntfs3
13+
DEPENDS:=+kmod-fs-ntfs3
1414
PKGARCH:=all
1515
endef
1616

package/network/config/firewall4/Makefile

+11-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
include $(TOPDIR)/rules.mk
66

77
PKG_NAME:=firewall4
8-
PKG_RELEASE:=1
8+
PKG_RELEASE:=$(AUTORELEASE)
99

1010
PKG_SOURCE_PROTO:=git
1111
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
12-
PKG_SOURCE_DATE:=2021-03-31
13-
PKG_SOURCE_VERSION:=29fba840201287b9265888adba6298779b750af5
14-
PKG_MIRROR_HASH:=1d26a611aeecdf37f09e4cdee6b192e5da087abf6e0fc7a9ca97a80e58d14222
12+
PKG_SOURCE_DATE:=2022-09-01
13+
PKG_SOURCE_VERSION:=f5fcdcf2c51f6f0a4b116c352000c4fe0523be77
14+
PKG_MIRROR_HASH:=57ef6f161abdd323019c026c959ab875fdfd3c972b8dc7767623634b1c259138
1515
PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
1616
PKG_LICENSE:=ISC
1717

@@ -21,8 +21,13 @@ define Package/firewall4
2121
SECTION:=net
2222
CATEGORY:=Base system
2323
TITLE:=OpenWrt 4th gen firewall
24-
DEPENDS:=+ucode +ucode-mod-fs +ucode-mod-uci +ucode-mod-ubus +kmod-nft-core +kmod-nft-fib +kmod-nft-nat +kmod-nft-nat6 +nftables-json
25-
CONFLICTS:=firewall kmod-ipt-nat
24+
DEPENDS:= \
25+
+kmod-nft-core +kmod-nft-fib +kmod-nft-offload \
26+
+kmod-nft-nat \
27+
+nftables-json \
28+
+ucode +ucode-mod-fs +ucode-mod-ubus +ucode-mod-uci
29+
EXTRA_DEPENDS:=ucode (>= 2022-03-22)
30+
PROVIDES:=uci-firewall
2631
endef
2732

2833
define Package/firewall4/description

package/network/services/dnsmasq/files/dhcp.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ config dnsmasq
2020
#list notinterface lo
2121
#list bogusnxdomain '64.94.110.11'
2222
option localservice 1 # disable to allow DNS requests from non-local subnets
23-
option filter_aaaa 0
23+
option filter_aaaa 1
2424
option cachesize 8000
2525
option mini_ttl 3600
2626
option ednspacket_max 1232
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
From 93ac8f9d469ff08d41170eb6934842b3626d5fdd Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]>
3+
Date: Wed, 23 Dec 2015 22:10:44 +0100
4+
Subject: [PATCH] DHCPv6: Honor assigning IPv6 address based on MAC address
5+
6+
Currently IPv6 addresses are assigned to tuple (IAID, DUID). When system
7+
changes IAID/DUID then old assigned IPv6 address cannot be reused, even
8+
when in config file was DHCPv6 assignment based on MAC address (and not on
9+
DUID).
10+
11+
IAID/DUID is changed when rebooting from one operating system to another;
12+
or after reinstalling system. In reality it is normal that DUID of some
13+
machine is changed, so people rather assign also IPv6 addresses based on
14+
MAC address.
15+
16+
So assigning IPv6 based on MAC address in dnsmasq is currently semi-broken.
17+
18+
This patch tries to fix it and honors IPv6 config rules with MAC address,
19+
to always assign particular IPv6 address to specific MAC address (when
20+
configured). And ignores the fact if IAID/DUID was changed.
21+
22+
Normally IPv6 address should be assigned by IAID/DUID (which also state
23+
DHCPv6 RFCs), but dnsmasq has already some support for assigning IPv6
24+
address based on MAC address, when users configured in config file.
25+
26+
So this patch just tries to fix above problem for user configuration with
27+
MAC addresses. It does not change assignment based on DUID.
28+
---
29+
src/rfc3315.c | 55 +++++++++++++++++++++++++++++++++++++++++++--------
30+
1 file changed, 47 insertions(+), 8 deletions(-)
31+
32+
--- a/src/rfc3315.c
33+
+++ b/src/rfc3315.c
34+
@@ -48,7 +48,7 @@ static int build_ia(struct state *state,
35+
static void end_ia(int t1cntr, unsigned int min_time, int do_fuzz);
36+
static void mark_context_used(struct state *state, struct in6_addr *addr);
37+
static void mark_config_used(struct dhcp_context *context, struct in6_addr *addr);
38+
-static int check_address(struct state *state, struct in6_addr *addr);
39+
+static int check_address(struct state *state, struct dhcp_config *config, struct in6_addr *addr);
40+
static int config_valid(struct dhcp_config *config, struct dhcp_context *context, struct in6_addr *addr, struct state *state, time_t now);
41+
static struct addrlist *config_implies(struct dhcp_config *config, struct dhcp_context *context, struct in6_addr *addr);
42+
static void add_address(struct state *state, struct dhcp_context *context, unsigned int lease_time, void *ia_option,
43+
@@ -688,8 +688,13 @@ static int dhcp6_no_relay(struct state *
44+
}
45+
else if (!(c = address6_available(state->context, &req_addr, solicit_tags, plain_range)))
46+
continue; /* not an address we're allowed */
47+
- else if (!check_address(state, &req_addr))
48+
+ else if (!check_address(state, config, &req_addr))
49+
continue; /* address leased elsewhere */
50+
+ else if (state->mac_len && config &&
51+
+ config_has_mac(config, state->mac, state->mac_len, state->mac_type) &&
52+
+ match_netid(c->filter, solicit_tags, plain_range) &&
53+
+ !config_implies(config, c, &req_addr))
54+
+ continue; /* another static address is configured */
55+
56+
/* add address to output packet */
57+
add_address(state, c, lease_time, ia_option, &min_time, &req_addr, now);
58+
@@ -701,7 +706,10 @@ static int dhcp6_no_relay(struct state *
59+
60+
/* Suggest configured address(es) */
61+
for (c = state->context; c; c = c->current)
62+
- if (!(c->flags & CONTEXT_CONF_USED) &&
63+
+ if ((!(c->flags & CONTEXT_CONF_USED) ||
64+
+ (state->mac_len && config &&
65+
+ config_has_mac(config, state->mac, state->mac_len, state->mac_type)
66+
+ )) &&
67+
match_netid(c->filter, solicit_tags, plain_range) &&
68+
config_valid(config, c, &addr, state, now))
69+
{
70+
@@ -725,6 +733,11 @@ static int dhcp6_no_relay(struct state *
71+
req_addr = ltmp->addr6;
72+
if ((c = address6_available(state->context, &req_addr, solicit_tags, plain_range)))
73+
{
74+
+ if (state->mac_len && config &&
75+
+ config_has_mac(config, state->mac, state->mac_len, state->mac_type) &&
76+
+ match_netid(c->filter, solicit_tags, plain_range) &&
77+
+ !config_implies(config, c, &req_addr))
78+
+ continue; /* skip this lease because another static address is configured */
79+
add_address(state, c, c->lease_time, NULL, &min_time, &req_addr, now);
80+
mark_context_used(state, &req_addr);
81+
get_context_tag(state, c);
82+
@@ -859,7 +872,7 @@ static int dhcp6_no_relay(struct state *
83+
put_opt6_string(_("address unavailable"));
84+
end_opt6(o1);
85+
}
86+
- else if (!check_address(state, &req_addr))
87+
+ else if (!check_address(state, config, &req_addr))
88+
{
89+
/* Address leased to another DUID/IAID */
90+
o1 = new_opt6(OPTION6_STATUS_CODE);
91+
@@ -989,6 +1002,16 @@ static int dhcp6_no_relay(struct state *
92+
{
93+
unsigned int lease_time;
94+
95+
+ /* check if another static address is preferred */
96+
+ if (state->mac_len && config &&
97+
+ config_has_mac(config, state->mac, state->mac_len, state->mac_type) &&
98+
+ !config_implies(config, this_context, &req_addr))
99+
+ {
100+
+ preferred_time = valid_time = 0;
101+
+ message = _("deprecated");
102+
+ }
103+
+ else
104+
+ {
105+
get_context_tag(state, this_context);
106+
107+
if (config_implies(config, this_context, &req_addr) && have_config(config, CONFIG_TIME))
108+
@@ -1014,6 +1037,7 @@ static int dhcp6_no_relay(struct state *
109+
110+
if (preferred_time == 0)
111+
message = _("deprecated");
112+
+ }
113+
114+
address_assigned = 1;
115+
}
116+
@@ -1070,11 +1094,22 @@ static int dhcp6_no_relay(struct state *
117+
ia_option = opt6_find(opt6_next(ia_option, ia_end), ia_end, OPTION6_IAADDR, 24))
118+
{
119+
struct in6_addr req_addr;
120+
+ struct dhcp_context *c;
121+
+ int config_addr_ok = 1;
122+
123+
/* alignment */
124+
memcpy(&req_addr, opt6_ptr(ia_option, 0), IN6ADDRSZ);
125+
+
126+
+ c = address6_valid(state->context, &req_addr, tagif, 1);
127+
+
128+
+ if (c && state->mac_len && config &&
129+
+ config_has_mac(config, state->mac, state->mac_len, state->mac_type) &&
130+
+ !config_implies(config, c, &req_addr))
131+
+ {
132+
+ config_addr_ok = 0;
133+
+ }
134+
135+
- if (!address6_valid(state->context, &req_addr, tagif, 1))
136+
+ if (!c || !config_addr_ok)
137+
{
138+
o1 = new_opt6(OPTION6_STATUS_CODE);
139+
put_opt6_short(DHCP6NOTONLINK);
140+
@@ -1692,11 +1727,15 @@ static void mark_config_used(struct dhcp
141+
context->flags |= CONTEXT_CONF_USED;
142+
}
143+
144+
-/* make sure address not leased to another CLID/IAID */
145+
-static int check_address(struct state *state, struct in6_addr *addr)
146+
+/* check that ipv6 address belongs to config with same mac address as in state or ipv6 address is not leased to another CLID/IAID */
147+
+static int check_address(struct state *state, struct dhcp_config *config, struct in6_addr *addr)
148+
{
149+
struct dhcp_lease *lease;
150+
151+
+ if (state->mac_len && config &&
152+
+ config_has_mac(config, state->mac, state->mac_len, state->mac_type))
153+
+ return 1;
154+
+
155+
if (!(lease = lease6_find_by_addr(addr, 128, 0)))
156+
return 1;
157+
158+
@@ -1773,7 +1812,7 @@ static int config_valid(struct dhcp_conf
159+
{
160+
setaddr6part(addr, addrpart+i);
161+
162+
- if (check_address(state, addr))
163+
+ if (check_address(state, config, addr))
164+
return 1;
165+
}
166+
}

target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@
706706
EXPORT_SYMBOL(xfrm_parse_spi);
707707
--- a/net/ipv4/tcp_input.c
708708
+++ b/net/ipv4/tcp_input.c
709-
@@ -4093,14 +4093,16 @@ static bool tcp_parse_aligned_timestamp(
709+
@@ -4116,14 +4116,16 @@ static bool tcp_parse_aligned_timestamp(
710710
{
711711
const __be32 *ptr = (const __be32 *)(th + 1);
712712

target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <[email protected]>
1818

1919
--- a/net/core/dev.c
2020
+++ b/net/core/dev.c
21-
@@ -6809,15 +6809,10 @@ void __netif_napi_del(struct napi_struct
21+
@@ -6810,15 +6810,10 @@ void __netif_napi_del(struct napi_struct
2222
}
2323
EXPORT_SYMBOL(__netif_napi_del);
2424

@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <[email protected]>
3535
weight = n->weight;
3636

3737
/* This NAPI_STATE_SCHED test is for avoiding a race
38-
@@ -6837,7 +6832,7 @@ static int napi_poll(struct napi_struct
38+
@@ -6838,7 +6833,7 @@ static int napi_poll(struct napi_struct
3939
n->poll, work, weight);
4040

4141
if (likely(work < weight))
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <[email protected]>
4444

4545
/* Drivers must not modify the NAPI state if they
4646
* consume the entire weight. In such cases this code
47-
@@ -6846,7 +6841,7 @@ static int napi_poll(struct napi_struct
47+
@@ -6847,7 +6842,7 @@ static int napi_poll(struct napi_struct
4848
*/
4949
if (unlikely(napi_disable_pending(n))) {
5050
napi_complete(n);
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <[email protected]>
5353
}
5454

5555
if (n->gro_bitmask) {
56-
@@ -6864,12 +6859,29 @@ static int napi_poll(struct napi_struct
56+
@@ -6865,12 +6860,29 @@ static int napi_poll(struct napi_struct
5757
if (unlikely(!list_empty(&n->poll_list))) {
5858
pr_warn_once("%s: Budget exhausted after napi rescheduled\n",
5959
n->dev ? n->dev->name : "backlog");

0 commit comments

Comments
 (0)