summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorAngus Chen <angus.chen@jaguarmicro.com>2023-05-12 09:01:52 +0800
committerDavid S. Miller <davem@davemloft.net>2023-05-15 08:42:07 +0100
commitb2cbac9b9b28730e9e53be20b6cdf979d3b9f27e (patch)
tree7347f32ea4db6680d4fd8b3dedb4bde4c1d65743 /net/ipv6
parent6d4ff8aed3b3f3afe12b40ff7e48815fc9688889 (diff)
net: Remove low_thresh in ip defrag
As low_thresh has no work in fragment reassembles,del it. And Mark it deprecated in sysctl Document. Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c9
-rw-r--r--net/ipv6/reassembly.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index d13240f13607..dc8a2854e7f3 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -42,7 +42,7 @@ static struct nft_ct_frag6_pernet *nf_frag_pernet(struct net *net)
}
#ifdef CONFIG_SYSCTL
-
+static unsigned long nf_conntrack_frag6_low_thresh_unused = IPV6_FRAG_LOW_THRESH;
static struct ctl_table nf_ct_frag6_sysctl_table[] = {
{
.procname = "nf_conntrack_frag6_timeout",
@@ -82,10 +82,10 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
nf_frag = nf_frag_pernet(net);
table[0].data = &nf_frag->fqdir->timeout;
- table[1].data = &nf_frag->fqdir->low_thresh;
- table[1].extra2 = &nf_frag->fqdir->high_thresh;
+ table[1].data = &nf_conntrack_frag6_low_thresh_unused;
+ table[1].extra2 = &nf_frag->fqdir->high_thresh;
table[2].data = &nf_frag->fqdir->high_thresh;
- table[2].extra1 = &nf_frag->fqdir->low_thresh;
+ table[2].extra1 = &nf_conntrack_frag6_low_thresh_unused;
hdr = register_net_sysctl(net, "net/netfilter", table);
if (hdr == NULL)
@@ -500,7 +500,6 @@ static int nf_ct_net_init(struct net *net)
return res;
nf_frag->fqdir->high_thresh = IPV6_FRAG_HIGH_THRESH;
- nf_frag->fqdir->low_thresh = IPV6_FRAG_LOW_THRESH;
nf_frag->fqdir->timeout = IPV6_FRAG_TIMEOUT;
res = nf_ct_frag6_sysctl_register(net);
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 5bc8a28e67f9..eb8373c25675 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 = &net->ipv6.fqdir->low_thresh;
- table[1].data = &net->ipv6.fqdir->low_thresh;
- table[1].extra2 = &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[2].data = &net->ipv6.fqdir->timeout;
hdr = register_net_sysctl(net, "net/ipv6", table);
@@ -536,7 +536,6 @@ 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);