Message ID | 20180926004103.163145-1-zenczykowski@gmail.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
Series | net-tcp: /proc/sys/net/ipv4/tcp_probe_interval is a u32 not int | expand |
On 09/25/2018 05:41 PM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski <maze@google.com> > > (fix documentation and sysctl access to treat it as such) > > Signed-off-by: Maciej Żenczykowski <maze@google.com> > --- While we are at it, we probably should add sane limits, given tcp_mtu_check_reprobe() does : u32 interval = net->ipv4.sysctl_tcp_probe_interval; ... if (unlikely(delta >= interval * HZ)) { A limit of UINT_MAX / HZ would avoid an overflow I guess.
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 8313a636dd53..960de8fe3f40 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt @@ -425,7 +425,7 @@ tcp_mtu_probing - INTEGER 1 - Disabled by default, enabled when an ICMP black hole detected 2 - Always enabled, use initial MSS of tcp_base_mss. -tcp_probe_interval - INTEGER +tcp_probe_interval - UNSIGNED INTEGER Controls how often to start TCP Packetization-Layer Path MTU Discovery reprobe. The default is reprobing every 10 minutes as per RFC4821. diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index b92f422f2fa8..c8fa935c3cdb 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -745,9 +745,9 @@ static struct ctl_table ipv4_net_table[] = { { .procname = "tcp_probe_interval", .data = &init_net.ipv4.sysctl_tcp_probe_interval, - .maxlen = sizeof(int), + .maxlen = sizeof(u32), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_douintvec, }, { .procname = "igmp_link_local_mcast_reports",