aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/ipv6/reassembly.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-05-16 20:41:12 -0700
committerJakub Kicinski <kuba@kernel.org>2023-05-16 20:46:30 -0700
commite7480a44d7c4ce4691fa6bcdb0318f0d81fe4b12 (patch)
tree7c51ce4a3cd82cf5fb82ab178fb8546ffb2b5548 /net/ipv6/reassembly.c
parentMerge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next (diff)
downloadwireguard-linux-e7480a44d7c4ce4691fa6bcdb0318f0d81fe4b12.tar.xz
wireguard-linux-e7480a44d7c4ce4691fa6bcdb0318f0d81fe4b12.zip
Revert "net: Remove low_thresh in ip defrag"
This reverts commit b2cbac9b9b28730e9e53be20b6cdf979d3b9f27e. We have multiple reports of obvious breakage from this patch. Reported-by: Ido Schimmel <idosch@idosch.org> Link: https://lore.kernel.org/all/ZGIRWjNcfqI8yY8W@shredder/ Link: https://lore.kernel.org/all/CADJHv_sDK=0RrMA2FTZQV5fw7UQ+qY=HG21Wu5qb0V9vvx5w6A@mail.gmail.com/ Reported-by: syzbot+a5e719ac7c268e414c95@syzkaller.appspotmail.com Reported-by: syzbot+a03fd670838d927d9cd8@syzkaller.appspotmail.com Fixes: b2cbac9b9b28 ("net: Remove low_thresh in ip defrag") Link: https://lore.kernel.org/r/20230517034112.1261835-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--net/ipv6/reassembly.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index eb8373c25675..5bc8a28e67f9 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -416,7 +416,7 @@ static const struct inet6_protocol frag_protocol = {
};
#ifdef CONFIG_SYSCTL
-static unsigned long ip6_frags_low_thresh_unused = IPV6_FRAG_LOW_THRESH;
+
static struct ctl_table ip6_frags_ns_ctl_table[] = {
{
.procname = "ip6frag_high_thresh",
@@ -465,9 +465,9 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
}
table[0].data = &net->ipv6.fqdir->high_thresh;
- table[0].extra1 = &ip6_frags_low_thresh_unused;
- table[1].data = &ip6_frags_low_thresh_unused;
- table[1].extra2 = &net->ipv6.fqdir->high_thresh;
+ table[0].extra1 = &net->ipv6.fqdir->low_thresh;
+ table[1].data = &net->ipv6.fqdir->low_thresh;
+ table[1].extra2 = &net->ipv6.fqdir->high_thresh;
table[2].data = &net->ipv6.fqdir->timeout;
hdr = register_net_sysctl(net, "net/ipv6", table);
@@ -536,6 +536,7 @@ static int __net_init ipv6_frags_init_net(struct net *net)
return res;
net->ipv6.fqdir->high_thresh = IPV6_FRAG_HIGH_THRESH;
+ net->ipv6.fqdir->low_thresh = IPV6_FRAG_LOW_THRESH;
net->ipv6.fqdir->timeout = IPV6_FRAG_TIMEOUT;
res = ip6_frags_ns_sysctl_register(net);