kernel: sysctl: change ipfrag_high/low_thresh to CTL_ULONG
PATCH 1/1 kernel: sysctl: change ipfrag_high/low_thresh to CTL_ULONG
3e67f106f619 ("inet: frags: break the 2GB limit for frags storage"), changes ipfrag_high/low_thread 'type' from int to long, using CTL_ULONG instead of CTL_INT to keep consistent.
--- kernel/sysctl_binary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sysctl_binary.c +2 -2
@@ -410,8 +410,8 @@ static const struct bin_table bin_net_ipv4_table[] = { { CTL_INT, NET_IPV4_ICMP_RATELIMIT, "icmp_ratelimit" }, { CTL_INT, NET_IPV4_ICMP_RATEMASK, "icmp_ratemask" }, - { CTL_INT, NET_IPV4_IPFRAG_HIGH_THRESH, "ipfrag_high_thresh" }, - { CTL_INT, NET_IPV4_IPFRAG_LOW_THRESH, "ipfrag_low_thresh" }, + { CTL_ULONG, NET_IPV4_IPFRAG_HIGH_THRESH, "ipfrag_high_thresh" }, + { CTL_ULONG, NET_IPV4_IPFRAG_LOW_THRESH, "ipfrag_low_thresh" }, { CTL_INT, NET_IPV4_IPFRAG_TIME, "ipfrag_time" }, { CTL_INT, NET_IPV4_IPFRAG_SECRET_INTERVAL, "ipfrag_secret_interval" },
Signature · 1 line
2.20.1
Quoted 4 lines · Kefeng Wang
3e67f106f619("inet: frags: break the 2GB limit for frags storage"), changes ipfrag_high/low_thread 'type' from int to long, usingCTL_ULONGinstead ofCTL_INTto keep consistent.
What about compatibility with existing applications ? Will there sysctl() fail if they provide 32bit variable ?
/proc/sys/net files are text files, but sysctl() system call has been discouraged for more than a decade.
Quoted 10 lines · Eric Dumazet
Quoted 3 lines · Kefeng Wang
3e67f106f619("inet: frags: break the 2GB limit for frags storage"), changes ipfrag_high/low_thread 'type' from int to long, usingCTL_ULONGinstead ofCTL_INTto keep consistent.What about compatibility with existing applications ? Will there
sysctl()fail if they provide 32bit variable ?
/proc/sys/netfiles are text files, butsysctl()system call has been discouraged for more than a decade.
The sysctl() system call is deprecated, so the main purpose of this patch is to keep consistent,
but it does set wrong value(eg, set 16000000000 to ipfrag_high_thresh) when use sysctl().