Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem. |
| 3 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * Begun April 1, 1996, Mike Shaver. |
| 5 | * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS] |
| 6 | */ |
| 7 | |
| 8 | #include <linux/mm.h> |
| 9 | #include <linux/module.h> |
| 10 | #include <linux/sysctl.h> |
Arnaldo Carvalho de Melo | 2038073 | 2005-08-16 02:18:02 -0300 | [diff] [blame] | 11 | #include <linux/igmp.h> |
Arnaldo Carvalho de Melo | 14c8502 | 2005-12-27 02:43:12 -0200 | [diff] [blame] | 12 | #include <linux/inetdevice.h> |
Stephen Hemminger | 227b60f | 2007-10-10 17:30:46 -0700 | [diff] [blame] | 13 | #include <linux/seqlock.h> |
Pavel Emelyanov | 3e37c3f | 2007-12-05 01:41:26 -0800 | [diff] [blame] | 14 | #include <linux/init.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 15 | #include <linux/slab.h> |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 16 | #include <linux/nsproxy.h> |
Glauber Costa | 3dc43e3 | 2011-12-11 21:47:05 +0000 | [diff] [blame] | 17 | #include <linux/swap.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #include <net/snmp.h> |
Arnaldo Carvalho de Melo | 2038073 | 2005-08-16 02:18:02 -0300 | [diff] [blame] | 19 | #include <net/icmp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | #include <net/ip.h> |
| 21 | #include <net/route.h> |
| 22 | #include <net/tcp.h> |
Hideo Aoki | 95766ff | 2007-12-31 00:29:24 -0800 | [diff] [blame] | 23 | #include <net/udp.h> |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 24 | #include <net/cipso_ipv4.h> |
Pavel Emelyanov | 04128f2 | 2007-10-15 02:33:45 -0700 | [diff] [blame] | 25 | #include <net/inet_frag.h> |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 26 | #include <net/ping.h> |
Glauber Costa | 3aaabe2 | 2011-12-11 21:47:06 +0000 | [diff] [blame] | 27 | #include <net/tcp_memcontrol.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | |
Herbert Xu | 89cee8b | 2005-12-13 23:14:27 -0800 | [diff] [blame] | 29 | static int zero; |
Yuchung Cheng | eed530b | 2012-05-02 13:30:03 +0000 | [diff] [blame] | 30 | static int two = 2; |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 31 | static int tcp_retr1_max = 255; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | static int ip_local_port_range_min[] = { 1, 1 }; |
| 33 | static int ip_local_port_range_max[] = { 65535, 65535 }; |
Alexey Dobriyan | 0147fc0 | 2010-11-22 12:54:21 +0000 | [diff] [blame] | 34 | static int tcp_adv_win_scale_min = -31; |
| 35 | static int tcp_adv_win_scale_max = 31; |
Eric Dumazet | 249fab7 | 2010-12-13 12:16:14 -0800 | [diff] [blame] | 36 | static int ip_ttl_min = 1; |
| 37 | static int ip_ttl_max = 255; |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 38 | static int ip_ping_group_range_min[] = { 0, 0 }; |
| 39 | static int ip_ping_group_range_max[] = { GID_T_MAX, GID_T_MAX }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | |
Stephen Hemminger | 227b60f | 2007-10-10 17:30:46 -0700 | [diff] [blame] | 41 | /* Update system visible IP port range */ |
| 42 | static void set_local_port_range(int range[2]) |
| 43 | { |
Eric Dumazet | 3c689b7 | 2008-10-08 14:18:04 -0700 | [diff] [blame] | 44 | write_seqlock(&sysctl_local_ports.lock); |
| 45 | sysctl_local_ports.range[0] = range[0]; |
| 46 | sysctl_local_ports.range[1] = range[1]; |
| 47 | write_sequnlock(&sysctl_local_ports.lock); |
Stephen Hemminger | 227b60f | 2007-10-10 17:30:46 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | /* Validate changes from /proc interface. */ |
Alexey Dobriyan | 8d65af7 | 2009-09-23 15:57:19 -0700 | [diff] [blame] | 51 | static int ipv4_local_port_range(ctl_table *table, int write, |
Stephen Hemminger | 227b60f | 2007-10-10 17:30:46 -0700 | [diff] [blame] | 52 | void __user *buffer, |
| 53 | size_t *lenp, loff_t *ppos) |
| 54 | { |
| 55 | int ret; |
Eric Dumazet | 3c689b7 | 2008-10-08 14:18:04 -0700 | [diff] [blame] | 56 | int range[2]; |
Stephen Hemminger | 227b60f | 2007-10-10 17:30:46 -0700 | [diff] [blame] | 57 | ctl_table tmp = { |
| 58 | .data = &range, |
| 59 | .maxlen = sizeof(range), |
| 60 | .mode = table->mode, |
| 61 | .extra1 = &ip_local_port_range_min, |
| 62 | .extra2 = &ip_local_port_range_max, |
| 63 | }; |
| 64 | |
Eric Dumazet | 3c689b7 | 2008-10-08 14:18:04 -0700 | [diff] [blame] | 65 | inet_get_local_port_range(range, range + 1); |
Alexey Dobriyan | 8d65af7 | 2009-09-23 15:57:19 -0700 | [diff] [blame] | 66 | ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); |
Stephen Hemminger | 227b60f | 2007-10-10 17:30:46 -0700 | [diff] [blame] | 67 | |
| 68 | if (write && ret == 0) { |
Anton Arapov | a25de53 | 2007-10-18 22:00:17 -0700 | [diff] [blame] | 69 | if (range[1] < range[0]) |
Stephen Hemminger | 227b60f | 2007-10-10 17:30:46 -0700 | [diff] [blame] | 70 | ret = -EINVAL; |
| 71 | else |
| 72 | set_local_port_range(range); |
| 73 | } |
| 74 | |
| 75 | return ret; |
| 76 | } |
| 77 | |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 78 | |
Eric Dumazet | e6560d4 | 2011-12-14 03:51:28 +0000 | [diff] [blame] | 79 | static void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high) |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 80 | { |
| 81 | gid_t *data = table->data; |
Eric Dumazet | 95c9617 | 2012-04-15 05:58:06 +0000 | [diff] [blame] | 82 | unsigned int seq; |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 83 | do { |
| 84 | seq = read_seqbegin(&sysctl_local_ports.lock); |
| 85 | |
| 86 | *low = data[0]; |
| 87 | *high = data[1]; |
| 88 | } while (read_seqretry(&sysctl_local_ports.lock, seq)); |
| 89 | } |
| 90 | |
| 91 | /* Update system visible IP port range */ |
Eric Dumazet | e6560d4 | 2011-12-14 03:51:28 +0000 | [diff] [blame] | 92 | static void set_ping_group_range(struct ctl_table *table, gid_t range[2]) |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 93 | { |
| 94 | gid_t *data = table->data; |
| 95 | write_seqlock(&sysctl_local_ports.lock); |
| 96 | data[0] = range[0]; |
| 97 | data[1] = range[1]; |
| 98 | write_sequnlock(&sysctl_local_ports.lock); |
| 99 | } |
| 100 | |
| 101 | /* Validate changes from /proc interface. */ |
| 102 | static int ipv4_ping_group_range(ctl_table *table, int write, |
| 103 | void __user *buffer, |
| 104 | size_t *lenp, loff_t *ppos) |
| 105 | { |
| 106 | int ret; |
| 107 | gid_t range[2]; |
| 108 | ctl_table tmp = { |
| 109 | .data = &range, |
| 110 | .maxlen = sizeof(range), |
| 111 | .mode = table->mode, |
| 112 | .extra1 = &ip_ping_group_range_min, |
| 113 | .extra2 = &ip_ping_group_range_max, |
| 114 | }; |
| 115 | |
| 116 | inet_get_ping_group_range_table(table, range, range + 1); |
| 117 | ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); |
| 118 | |
| 119 | if (write && ret == 0) |
| 120 | set_ping_group_range(table, range); |
| 121 | |
| 122 | return ret; |
| 123 | } |
| 124 | |
Alexey Dobriyan | 8d65af7 | 2009-09-23 15:57:19 -0700 | [diff] [blame] | 125 | static int proc_tcp_congestion_control(ctl_table *ctl, int write, |
Stephen Hemminger | 317a76f | 2005-06-23 12:19:55 -0700 | [diff] [blame] | 126 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 127 | { |
| 128 | char val[TCP_CA_NAME_MAX]; |
| 129 | ctl_table tbl = { |
| 130 | .data = val, |
| 131 | .maxlen = TCP_CA_NAME_MAX, |
| 132 | }; |
| 133 | int ret; |
| 134 | |
| 135 | tcp_get_default_congestion_control(val); |
| 136 | |
Alexey Dobriyan | 8d65af7 | 2009-09-23 15:57:19 -0700 | [diff] [blame] | 137 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
Stephen Hemminger | 317a76f | 2005-06-23 12:19:55 -0700 | [diff] [blame] | 138 | if (write && ret == 0) |
| 139 | ret = tcp_set_default_congestion_control(val); |
| 140 | return ret; |
| 141 | } |
| 142 | |
Stephen Hemminger | 3ff825b | 2006-11-09 16:32:06 -0800 | [diff] [blame] | 143 | static int proc_tcp_available_congestion_control(ctl_table *ctl, |
Alexey Dobriyan | 8d65af7 | 2009-09-23 15:57:19 -0700 | [diff] [blame] | 144 | int write, |
Stephen Hemminger | 3ff825b | 2006-11-09 16:32:06 -0800 | [diff] [blame] | 145 | void __user *buffer, size_t *lenp, |
| 146 | loff_t *ppos) |
| 147 | { |
| 148 | ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX, }; |
| 149 | int ret; |
| 150 | |
| 151 | tbl.data = kmalloc(tbl.maxlen, GFP_USER); |
| 152 | if (!tbl.data) |
| 153 | return -ENOMEM; |
| 154 | tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX); |
Alexey Dobriyan | 8d65af7 | 2009-09-23 15:57:19 -0700 | [diff] [blame] | 155 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
Stephen Hemminger | 3ff825b | 2006-11-09 16:32:06 -0800 | [diff] [blame] | 156 | kfree(tbl.data); |
| 157 | return ret; |
| 158 | } |
| 159 | |
Stephen Hemminger | ce7bc3b | 2006-11-09 16:35:15 -0800 | [diff] [blame] | 160 | static int proc_allowed_congestion_control(ctl_table *ctl, |
Alexey Dobriyan | 8d65af7 | 2009-09-23 15:57:19 -0700 | [diff] [blame] | 161 | int write, |
Stephen Hemminger | ce7bc3b | 2006-11-09 16:35:15 -0800 | [diff] [blame] | 162 | void __user *buffer, size_t *lenp, |
| 163 | loff_t *ppos) |
| 164 | { |
| 165 | ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX }; |
| 166 | int ret; |
| 167 | |
| 168 | tbl.data = kmalloc(tbl.maxlen, GFP_USER); |
| 169 | if (!tbl.data) |
| 170 | return -ENOMEM; |
| 171 | |
| 172 | tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen); |
Alexey Dobriyan | 8d65af7 | 2009-09-23 15:57:19 -0700 | [diff] [blame] | 173 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
Stephen Hemminger | ce7bc3b | 2006-11-09 16:35:15 -0800 | [diff] [blame] | 174 | if (write && ret == 0) |
| 175 | ret = tcp_set_allowed_congestion_control(tbl.data); |
| 176 | kfree(tbl.data); |
| 177 | return ret; |
| 178 | } |
| 179 | |
Glauber Costa | 3dc43e3 | 2011-12-11 21:47:05 +0000 | [diff] [blame] | 180 | static int ipv4_tcp_mem(ctl_table *ctl, int write, |
| 181 | void __user *buffer, size_t *lenp, |
| 182 | loff_t *ppos) |
| 183 | { |
| 184 | int ret; |
| 185 | unsigned long vec[3]; |
| 186 | struct net *net = current->nsproxy->net_ns; |
Glauber Costa | 3aaabe2 | 2011-12-11 21:47:06 +0000 | [diff] [blame] | 187 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM |
| 188 | struct mem_cgroup *memcg; |
| 189 | #endif |
Glauber Costa | 3dc43e3 | 2011-12-11 21:47:05 +0000 | [diff] [blame] | 190 | |
| 191 | ctl_table tmp = { |
| 192 | .data = &vec, |
| 193 | .maxlen = sizeof(vec), |
| 194 | .mode = ctl->mode, |
| 195 | }; |
| 196 | |
| 197 | if (!write) { |
| 198 | ctl->data = &net->ipv4.sysctl_tcp_mem; |
| 199 | return proc_doulongvec_minmax(ctl, write, buffer, lenp, ppos); |
| 200 | } |
| 201 | |
| 202 | ret = proc_doulongvec_minmax(&tmp, write, buffer, lenp, ppos); |
| 203 | if (ret) |
| 204 | return ret; |
| 205 | |
Glauber Costa | 3aaabe2 | 2011-12-11 21:47:06 +0000 | [diff] [blame] | 206 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM |
| 207 | rcu_read_lock(); |
| 208 | memcg = mem_cgroup_from_task(current); |
| 209 | |
| 210 | tcp_prot_mem(memcg, vec[0], 0); |
| 211 | tcp_prot_mem(memcg, vec[1], 1); |
| 212 | tcp_prot_mem(memcg, vec[2], 2); |
| 213 | rcu_read_unlock(); |
| 214 | #endif |
| 215 | |
Glauber Costa | 3dc43e3 | 2011-12-11 21:47:05 +0000 | [diff] [blame] | 216 | net->ipv4.sysctl_tcp_mem[0] = vec[0]; |
| 217 | net->ipv4.sysctl_tcp_mem[1] = vec[1]; |
| 218 | net->ipv4.sysctl_tcp_mem[2] = vec[2]; |
| 219 | |
| 220 | return 0; |
| 221 | } |
| 222 | |
Pavel Emelyanov | 3e37c3f | 2007-12-05 01:41:26 -0800 | [diff] [blame] | 223 | static struct ctl_table ipv4_table[] = { |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 224 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 225 | .procname = "tcp_timestamps", |
| 226 | .data = &sysctl_tcp_timestamps, |
| 227 | .maxlen = sizeof(int), |
| 228 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 229 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | }, |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 231 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | .procname = "tcp_window_scaling", |
| 233 | .data = &sysctl_tcp_window_scaling, |
| 234 | .maxlen = sizeof(int), |
| 235 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 236 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | }, |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 238 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | .procname = "tcp_sack", |
| 240 | .data = &sysctl_tcp_sack, |
| 241 | .maxlen = sizeof(int), |
| 242 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 243 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 244 | }, |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 245 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | .procname = "tcp_retrans_collapse", |
| 247 | .data = &sysctl_tcp_retrans_collapse, |
| 248 | .maxlen = sizeof(int), |
| 249 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 250 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | }, |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 252 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 253 | .procname = "ip_default_ttl", |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 254 | .data = &sysctl_ip_default_ttl, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 255 | .maxlen = sizeof(int), |
| 256 | .mode = 0644, |
Eric Dumazet | 249fab7 | 2010-12-13 12:16:14 -0800 | [diff] [blame] | 257 | .proc_handler = proc_dointvec_minmax, |
| 258 | .extra1 = &ip_ttl_min, |
| 259 | .extra2 = &ip_ttl_max, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 | }, |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 261 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 262 | .procname = "ip_no_pmtu_disc", |
| 263 | .data = &ipv4_config.no_pmtu_disc, |
| 264 | .maxlen = sizeof(int), |
| 265 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 266 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | }, |
| 268 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | .procname = "ip_nonlocal_bind", |
| 270 | .data = &sysctl_ip_nonlocal_bind, |
| 271 | .maxlen = sizeof(int), |
| 272 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 273 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 274 | }, |
| 275 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | .procname = "tcp_syn_retries", |
| 277 | .data = &sysctl_tcp_syn_retries, |
| 278 | .maxlen = sizeof(int), |
| 279 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 280 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 281 | }, |
| 282 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | .procname = "tcp_synack_retries", |
| 284 | .data = &sysctl_tcp_synack_retries, |
| 285 | .maxlen = sizeof(int), |
| 286 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 287 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 288 | }, |
| 289 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 290 | .procname = "tcp_max_orphans", |
| 291 | .data = &sysctl_tcp_max_orphans, |
| 292 | .maxlen = sizeof(int), |
| 293 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 294 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 295 | }, |
| 296 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 297 | .procname = "tcp_max_tw_buckets", |
Arnaldo Carvalho de Melo | 295ff7e | 2005-08-09 20:44:40 -0700 | [diff] [blame] | 298 | .data = &tcp_death_row.sysctl_max_tw_buckets, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | .maxlen = sizeof(int), |
| 300 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 301 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 302 | }, |
| 303 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 304 | .procname = "ip_dynaddr", |
| 305 | .data = &sysctl_ip_dynaddr, |
| 306 | .maxlen = sizeof(int), |
| 307 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 308 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 309 | }, |
| 310 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 311 | .procname = "tcp_keepalive_time", |
| 312 | .data = &sysctl_tcp_keepalive_time, |
| 313 | .maxlen = sizeof(int), |
| 314 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 315 | .proc_handler = proc_dointvec_jiffies, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 316 | }, |
| 317 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | .procname = "tcp_keepalive_probes", |
| 319 | .data = &sysctl_tcp_keepalive_probes, |
| 320 | .maxlen = sizeof(int), |
| 321 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 322 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 323 | }, |
| 324 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | .procname = "tcp_keepalive_intvl", |
| 326 | .data = &sysctl_tcp_keepalive_intvl, |
| 327 | .maxlen = sizeof(int), |
| 328 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 329 | .proc_handler = proc_dointvec_jiffies, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 330 | }, |
| 331 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 332 | .procname = "tcp_retries1", |
| 333 | .data = &sysctl_tcp_retries1, |
| 334 | .maxlen = sizeof(int), |
| 335 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 336 | .proc_handler = proc_dointvec_minmax, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 337 | .extra2 = &tcp_retr1_max |
| 338 | }, |
| 339 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 340 | .procname = "tcp_retries2", |
| 341 | .data = &sysctl_tcp_retries2, |
| 342 | .maxlen = sizeof(int), |
| 343 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 344 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 345 | }, |
| 346 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 347 | .procname = "tcp_fin_timeout", |
| 348 | .data = &sysctl_tcp_fin_timeout, |
| 349 | .maxlen = sizeof(int), |
| 350 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 351 | .proc_handler = proc_dointvec_jiffies, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 352 | }, |
| 353 | #ifdef CONFIG_SYN_COOKIES |
| 354 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 355 | .procname = "tcp_syncookies", |
| 356 | .data = &sysctl_tcp_syncookies, |
| 357 | .maxlen = sizeof(int), |
| 358 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 359 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 360 | }, |
| 361 | #endif |
| 362 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 363 | .procname = "tcp_tw_recycle", |
Arnaldo Carvalho de Melo | 295ff7e | 2005-08-09 20:44:40 -0700 | [diff] [blame] | 364 | .data = &tcp_death_row.sysctl_tw_recycle, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 365 | .maxlen = sizeof(int), |
| 366 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 367 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 368 | }, |
| 369 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 370 | .procname = "tcp_abort_on_overflow", |
| 371 | .data = &sysctl_tcp_abort_on_overflow, |
| 372 | .maxlen = sizeof(int), |
| 373 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 374 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 375 | }, |
| 376 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 377 | .procname = "tcp_stdurg", |
| 378 | .data = &sysctl_tcp_stdurg, |
| 379 | .maxlen = sizeof(int), |
| 380 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 381 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 382 | }, |
| 383 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 384 | .procname = "tcp_rfc1337", |
| 385 | .data = &sysctl_tcp_rfc1337, |
| 386 | .maxlen = sizeof(int), |
| 387 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 388 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 389 | }, |
| 390 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 391 | .procname = "tcp_max_syn_backlog", |
| 392 | .data = &sysctl_max_syn_backlog, |
| 393 | .maxlen = sizeof(int), |
| 394 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 395 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 396 | }, |
| 397 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 398 | .procname = "ip_local_port_range", |
Eric Dumazet | 3c689b7 | 2008-10-08 14:18:04 -0700 | [diff] [blame] | 399 | .data = &sysctl_local_ports.range, |
| 400 | .maxlen = sizeof(sysctl_local_ports.range), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 401 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 402 | .proc_handler = ipv4_local_port_range, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 403 | }, |
Amerigo Wang | e3826f1 | 2010-05-05 00:27:06 +0000 | [diff] [blame] | 404 | { |
| 405 | .procname = "ip_local_reserved_ports", |
| 406 | .data = NULL, /* initialized in sysctl_ipv4_init */ |
| 407 | .maxlen = 65536, |
| 408 | .mode = 0644, |
| 409 | .proc_handler = proc_do_large_bitmap, |
| 410 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 411 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 412 | .procname = "igmp_max_memberships", |
| 413 | .data = &sysctl_igmp_max_memberships, |
| 414 | .maxlen = sizeof(int), |
| 415 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 416 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 417 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 418 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 419 | .procname = "igmp_max_msf", |
| 420 | .data = &sysctl_igmp_max_msf, |
| 421 | .maxlen = sizeof(int), |
| 422 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 423 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 424 | }, |
| 425 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 426 | .procname = "inet_peer_threshold", |
| 427 | .data = &inet_peer_threshold, |
| 428 | .maxlen = sizeof(int), |
| 429 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 430 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 431 | }, |
| 432 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | .procname = "inet_peer_minttl", |
| 434 | .data = &inet_peer_minttl, |
| 435 | .maxlen = sizeof(int), |
| 436 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 437 | .proc_handler = proc_dointvec_jiffies, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 438 | }, |
| 439 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 440 | .procname = "inet_peer_maxttl", |
| 441 | .data = &inet_peer_maxttl, |
| 442 | .maxlen = sizeof(int), |
| 443 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 444 | .proc_handler = proc_dointvec_jiffies, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 445 | }, |
| 446 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 447 | .procname = "tcp_orphan_retries", |
| 448 | .data = &sysctl_tcp_orphan_retries, |
| 449 | .maxlen = sizeof(int), |
| 450 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 451 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 452 | }, |
| 453 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 454 | .procname = "tcp_fack", |
| 455 | .data = &sysctl_tcp_fack, |
| 456 | .maxlen = sizeof(int), |
| 457 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 458 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 459 | }, |
| 460 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 461 | .procname = "tcp_reordering", |
| 462 | .data = &sysctl_tcp_reordering, |
| 463 | .maxlen = sizeof(int), |
| 464 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 465 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 466 | }, |
| 467 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 468 | .procname = "tcp_ecn", |
| 469 | .data = &sysctl_tcp_ecn, |
| 470 | .maxlen = sizeof(int), |
| 471 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 472 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 473 | }, |
| 474 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 475 | .procname = "tcp_dsack", |
| 476 | .data = &sysctl_tcp_dsack, |
| 477 | .maxlen = sizeof(int), |
| 478 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 479 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 480 | }, |
| 481 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 482 | .procname = "tcp_wmem", |
| 483 | .data = &sysctl_tcp_wmem, |
| 484 | .maxlen = sizeof(sysctl_tcp_wmem), |
| 485 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 486 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 487 | }, |
| 488 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 489 | .procname = "tcp_rmem", |
| 490 | .data = &sysctl_tcp_rmem, |
| 491 | .maxlen = sizeof(sysctl_tcp_rmem), |
| 492 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 493 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 494 | }, |
| 495 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 496 | .procname = "tcp_app_win", |
| 497 | .data = &sysctl_tcp_app_win, |
| 498 | .maxlen = sizeof(int), |
| 499 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 500 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 501 | }, |
| 502 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 503 | .procname = "tcp_adv_win_scale", |
| 504 | .data = &sysctl_tcp_adv_win_scale, |
| 505 | .maxlen = sizeof(int), |
| 506 | .mode = 0644, |
Alexey Dobriyan | 0147fc0 | 2010-11-22 12:54:21 +0000 | [diff] [blame] | 507 | .proc_handler = proc_dointvec_minmax, |
| 508 | .extra1 = &tcp_adv_win_scale_min, |
| 509 | .extra2 = &tcp_adv_win_scale_max, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 510 | }, |
| 511 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 512 | .procname = "tcp_tw_reuse", |
| 513 | .data = &sysctl_tcp_tw_reuse, |
| 514 | .maxlen = sizeof(int), |
| 515 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 516 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 517 | }, |
| 518 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 519 | .procname = "tcp_frto", |
| 520 | .data = &sysctl_tcp_frto, |
| 521 | .maxlen = sizeof(int), |
| 522 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 523 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 524 | }, |
| 525 | { |
Ilpo Järvinen | 3cfe3ba | 2007-02-27 10:09:49 -0800 | [diff] [blame] | 526 | .procname = "tcp_frto_response", |
| 527 | .data = &sysctl_tcp_frto_response, |
| 528 | .maxlen = sizeof(int), |
| 529 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 530 | .proc_handler = proc_dointvec |
Ilpo Järvinen | 3cfe3ba | 2007-02-27 10:09:49 -0800 | [diff] [blame] | 531 | }, |
| 532 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 533 | .procname = "tcp_low_latency", |
| 534 | .data = &sysctl_tcp_low_latency, |
| 535 | .maxlen = sizeof(int), |
| 536 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 537 | .proc_handler = proc_dointvec |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 538 | }, |
| 539 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 540 | .procname = "tcp_no_metrics_save", |
| 541 | .data = &sysctl_tcp_nometrics_save, |
| 542 | .maxlen = sizeof(int), |
| 543 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 544 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 545 | }, |
| 546 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 547 | .procname = "tcp_moderate_rcvbuf", |
| 548 | .data = &sysctl_tcp_moderate_rcvbuf, |
| 549 | .maxlen = sizeof(int), |
| 550 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 551 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 552 | }, |
| 553 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | .procname = "tcp_tso_win_divisor", |
| 555 | .data = &sysctl_tcp_tso_win_divisor, |
| 556 | .maxlen = sizeof(int), |
| 557 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 558 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 559 | }, |
| 560 | { |
Stephen Hemminger | 317a76f | 2005-06-23 12:19:55 -0700 | [diff] [blame] | 561 | .procname = "tcp_congestion_control", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 562 | .mode = 0644, |
Stephen Hemminger | 317a76f | 2005-06-23 12:19:55 -0700 | [diff] [blame] | 563 | .maxlen = TCP_CA_NAME_MAX, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 564 | .proc_handler = proc_tcp_congestion_control, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 565 | }, |
Stephen Hemminger | 9772efb | 2005-11-10 17:09:53 -0800 | [diff] [blame] | 566 | { |
Stephen Hemminger | 9772efb | 2005-11-10 17:09:53 -0800 | [diff] [blame] | 567 | .procname = "tcp_abc", |
| 568 | .data = &sysctl_tcp_abc, |
| 569 | .maxlen = sizeof(int), |
| 570 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 571 | .proc_handler = proc_dointvec, |
Stephen Hemminger | 9772efb | 2005-11-10 17:09:53 -0800 | [diff] [blame] | 572 | }, |
John Heffner | 5d424d5 | 2006-03-20 17:53:41 -0800 | [diff] [blame] | 573 | { |
John Heffner | 5d424d5 | 2006-03-20 17:53:41 -0800 | [diff] [blame] | 574 | .procname = "tcp_mtu_probing", |
| 575 | .data = &sysctl_tcp_mtu_probing, |
| 576 | .maxlen = sizeof(int), |
| 577 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 578 | .proc_handler = proc_dointvec, |
John Heffner | 5d424d5 | 2006-03-20 17:53:41 -0800 | [diff] [blame] | 579 | }, |
| 580 | { |
John Heffner | 5d424d5 | 2006-03-20 17:53:41 -0800 | [diff] [blame] | 581 | .procname = "tcp_base_mss", |
| 582 | .data = &sysctl_tcp_base_mss, |
| 583 | .maxlen = sizeof(int), |
| 584 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 585 | .proc_handler = proc_dointvec, |
John Heffner | 5d424d5 | 2006-03-20 17:53:41 -0800 | [diff] [blame] | 586 | }, |
YOSHIFUJI Hideaki | e905a9e | 2007-02-09 23:24:47 +0900 | [diff] [blame] | 587 | { |
Rick Jones | 15d99e0 | 2006-03-20 22:40:29 -0800 | [diff] [blame] | 588 | .procname = "tcp_workaround_signed_windows", |
| 589 | .data = &sysctl_tcp_workaround_signed_windows, |
| 590 | .maxlen = sizeof(int), |
| 591 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 592 | .proc_handler = proc_dointvec |
Rick Jones | 15d99e0 | 2006-03-20 22:40:29 -0800 | [diff] [blame] | 593 | }, |
Chris Leech | 9593782 | 2006-05-23 18:02:55 -0700 | [diff] [blame] | 594 | #ifdef CONFIG_NET_DMA |
| 595 | { |
Chris Leech | 9593782 | 2006-05-23 18:02:55 -0700 | [diff] [blame] | 596 | .procname = "tcp_dma_copybreak", |
| 597 | .data = &sysctl_tcp_dma_copybreak, |
| 598 | .maxlen = sizeof(int), |
| 599 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 600 | .proc_handler = proc_dointvec |
Chris Leech | 9593782 | 2006-05-23 18:02:55 -0700 | [diff] [blame] | 601 | }, |
| 602 | #endif |
David S. Miller | 35089bb | 2006-06-13 22:33:04 -0700 | [diff] [blame] | 603 | { |
David S. Miller | 35089bb | 2006-06-13 22:33:04 -0700 | [diff] [blame] | 604 | .procname = "tcp_slow_start_after_idle", |
| 605 | .data = &sysctl_tcp_slow_start_after_idle, |
| 606 | .maxlen = sizeof(int), |
| 607 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 608 | .proc_handler = proc_dointvec |
David S. Miller | 35089bb | 2006-06-13 22:33:04 -0700 | [diff] [blame] | 609 | }, |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 610 | #ifdef CONFIG_NETLABEL |
| 611 | { |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 612 | .procname = "cipso_cache_enable", |
| 613 | .data = &cipso_v4_cache_enabled, |
| 614 | .maxlen = sizeof(int), |
| 615 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 616 | .proc_handler = proc_dointvec, |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 617 | }, |
| 618 | { |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 619 | .procname = "cipso_cache_bucket_size", |
| 620 | .data = &cipso_v4_cache_bucketsize, |
| 621 | .maxlen = sizeof(int), |
| 622 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 623 | .proc_handler = proc_dointvec, |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 624 | }, |
| 625 | { |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 626 | .procname = "cipso_rbm_optfmt", |
| 627 | .data = &cipso_v4_rbm_optfmt, |
| 628 | .maxlen = sizeof(int), |
| 629 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 630 | .proc_handler = proc_dointvec, |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 631 | }, |
| 632 | { |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 633 | .procname = "cipso_rbm_strictvalid", |
| 634 | .data = &cipso_v4_rbm_strictvalid, |
| 635 | .maxlen = sizeof(int), |
| 636 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 637 | .proc_handler = proc_dointvec, |
Paul Moore | 446fda4 | 2006-08-03 16:48:06 -0700 | [diff] [blame] | 638 | }, |
| 639 | #endif /* CONFIG_NETLABEL */ |
Stephen Hemminger | 3ff825b | 2006-11-09 16:32:06 -0800 | [diff] [blame] | 640 | { |
Stephen Hemminger | 3ff825b | 2006-11-09 16:32:06 -0800 | [diff] [blame] | 641 | .procname = "tcp_available_congestion_control", |
| 642 | .maxlen = TCP_CA_BUF_MAX, |
| 643 | .mode = 0444, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 644 | .proc_handler = proc_tcp_available_congestion_control, |
Stephen Hemminger | 3ff825b | 2006-11-09 16:32:06 -0800 | [diff] [blame] | 645 | }, |
Stephen Hemminger | ce7bc3b | 2006-11-09 16:35:15 -0800 | [diff] [blame] | 646 | { |
Stephen Hemminger | ce7bc3b | 2006-11-09 16:35:15 -0800 | [diff] [blame] | 647 | .procname = "tcp_allowed_congestion_control", |
| 648 | .maxlen = TCP_CA_BUF_MAX, |
| 649 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 650 | .proc_handler = proc_allowed_congestion_control, |
Stephen Hemminger | ce7bc3b | 2006-11-09 16:35:15 -0800 | [diff] [blame] | 651 | }, |
John Heffner | 886236c | 2007-03-25 19:21:45 -0700 | [diff] [blame] | 652 | { |
John Heffner | 886236c | 2007-03-25 19:21:45 -0700 | [diff] [blame] | 653 | .procname = "tcp_max_ssthresh", |
| 654 | .data = &sysctl_tcp_max_ssthresh, |
| 655 | .maxlen = sizeof(int), |
| 656 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 657 | .proc_handler = proc_dointvec, |
John Heffner | 886236c | 2007-03-25 19:21:45 -0700 | [diff] [blame] | 658 | }, |
Hideo Aoki | 95766ff | 2007-12-31 00:29:24 -0800 | [diff] [blame] | 659 | { |
William Allen Simpson | 519855c | 2009-12-02 18:14:19 +0000 | [diff] [blame] | 660 | .procname = "tcp_cookie_size", |
| 661 | .data = &sysctl_tcp_cookie_size, |
| 662 | .maxlen = sizeof(int), |
| 663 | .mode = 0644, |
| 664 | .proc_handler = proc_dointvec |
| 665 | }, |
| 666 | { |
Andreas Petlund | 36e31b0a | 2010-02-18 02:47:01 +0000 | [diff] [blame] | 667 | .procname = "tcp_thin_linear_timeouts", |
| 668 | .data = &sysctl_tcp_thin_linear_timeouts, |
| 669 | .maxlen = sizeof(int), |
| 670 | .mode = 0644, |
| 671 | .proc_handler = proc_dointvec |
| 672 | }, |
Andreas Petlund | 7e38017 | 2010-02-18 04:48:19 +0000 | [diff] [blame] | 673 | { |
| 674 | .procname = "tcp_thin_dupack", |
| 675 | .data = &sysctl_tcp_thin_dupack, |
| 676 | .maxlen = sizeof(int), |
| 677 | .mode = 0644, |
| 678 | .proc_handler = proc_dointvec |
| 679 | }, |
Andreas Petlund | 36e31b0a | 2010-02-18 02:47:01 +0000 | [diff] [blame] | 680 | { |
Yuchung Cheng | eed530b | 2012-05-02 13:30:03 +0000 | [diff] [blame] | 681 | .procname = "tcp_early_retrans", |
| 682 | .data = &sysctl_tcp_early_retrans, |
| 683 | .maxlen = sizeof(int), |
| 684 | .mode = 0644, |
| 685 | .proc_handler = proc_dointvec_minmax, |
| 686 | .extra1 = &zero, |
| 687 | .extra2 = &two, |
| 688 | }, |
| 689 | { |
Hideo Aoki | 95766ff | 2007-12-31 00:29:24 -0800 | [diff] [blame] | 690 | .procname = "udp_mem", |
| 691 | .data = &sysctl_udp_mem, |
| 692 | .maxlen = sizeof(sysctl_udp_mem), |
| 693 | .mode = 0644, |
Eric Dumazet | 8d987e5 | 2010-11-09 23:24:26 +0000 | [diff] [blame] | 694 | .proc_handler = proc_doulongvec_minmax, |
Hideo Aoki | 95766ff | 2007-12-31 00:29:24 -0800 | [diff] [blame] | 695 | }, |
| 696 | { |
Hideo Aoki | 95766ff | 2007-12-31 00:29:24 -0800 | [diff] [blame] | 697 | .procname = "udp_rmem_min", |
| 698 | .data = &sysctl_udp_rmem_min, |
| 699 | .maxlen = sizeof(sysctl_udp_rmem_min), |
| 700 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 701 | .proc_handler = proc_dointvec_minmax, |
Hideo Aoki | 95766ff | 2007-12-31 00:29:24 -0800 | [diff] [blame] | 702 | .extra1 = &zero |
| 703 | }, |
| 704 | { |
Hideo Aoki | 95766ff | 2007-12-31 00:29:24 -0800 | [diff] [blame] | 705 | .procname = "udp_wmem_min", |
| 706 | .data = &sysctl_udp_wmem_min, |
| 707 | .maxlen = sizeof(sysctl_udp_wmem_min), |
| 708 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 709 | .proc_handler = proc_dointvec_minmax, |
Hideo Aoki | 95766ff | 2007-12-31 00:29:24 -0800 | [diff] [blame] | 710 | .extra1 = &zero |
| 711 | }, |
Eric W. Biederman | f8572d8 | 2009-11-05 13:32:03 -0800 | [diff] [blame] | 712 | { } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 713 | }; |
Pavel Emelyanov | 3e37c3f | 2007-12-05 01:41:26 -0800 | [diff] [blame] | 714 | |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 715 | static struct ctl_table ipv4_net_table[] = { |
| 716 | { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 717 | .procname = "icmp_echo_ignore_all", |
| 718 | .data = &init_net.ipv4.sysctl_icmp_echo_ignore_all, |
| 719 | .maxlen = sizeof(int), |
| 720 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 721 | .proc_handler = proc_dointvec |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 722 | }, |
| 723 | { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 724 | .procname = "icmp_echo_ignore_broadcasts", |
| 725 | .data = &init_net.ipv4.sysctl_icmp_echo_ignore_broadcasts, |
| 726 | .maxlen = sizeof(int), |
| 727 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 728 | .proc_handler = proc_dointvec |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 729 | }, |
| 730 | { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 731 | .procname = "icmp_ignore_bogus_error_responses", |
| 732 | .data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses, |
| 733 | .maxlen = sizeof(int), |
| 734 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 735 | .proc_handler = proc_dointvec |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 736 | }, |
| 737 | { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 738 | .procname = "icmp_errors_use_inbound_ifaddr", |
| 739 | .data = &init_net.ipv4.sysctl_icmp_errors_use_inbound_ifaddr, |
| 740 | .maxlen = sizeof(int), |
| 741 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 742 | .proc_handler = proc_dointvec |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 743 | }, |
| 744 | { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 745 | .procname = "icmp_ratelimit", |
| 746 | .data = &init_net.ipv4.sysctl_icmp_ratelimit, |
| 747 | .maxlen = sizeof(int), |
| 748 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 749 | .proc_handler = proc_dointvec_ms_jiffies, |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 750 | }, |
| 751 | { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 752 | .procname = "icmp_ratemask", |
| 753 | .data = &init_net.ipv4.sysctl_icmp_ratemask, |
| 754 | .maxlen = sizeof(int), |
| 755 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 756 | .proc_handler = proc_dointvec |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 757 | }, |
Neil Horman | 1080d70 | 2008-10-27 12:28:25 -0700 | [diff] [blame] | 758 | { |
Neil Horman | 1080d70 | 2008-10-27 12:28:25 -0700 | [diff] [blame] | 759 | .procname = "rt_cache_rebuild_count", |
| 760 | .data = &init_net.ipv4.sysctl_rt_cache_rebuild_count, |
| 761 | .maxlen = sizeof(int), |
| 762 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 763 | .proc_handler = proc_dointvec |
Neil Horman | 1080d70 | 2008-10-27 12:28:25 -0700 | [diff] [blame] | 764 | }, |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 765 | { |
| 766 | .procname = "ping_group_range", |
| 767 | .data = &init_net.ipv4.sysctl_ping_group_range, |
| 768 | .maxlen = sizeof(init_net.ipv4.sysctl_ping_group_range), |
| 769 | .mode = 0644, |
| 770 | .proc_handler = ipv4_ping_group_range, |
| 771 | }, |
Glauber Costa | 3dc43e3 | 2011-12-11 21:47:05 +0000 | [diff] [blame] | 772 | { |
| 773 | .procname = "tcp_mem", |
| 774 | .maxlen = sizeof(init_net.ipv4.sysctl_tcp_mem), |
| 775 | .mode = 0644, |
| 776 | .proc_handler = ipv4_tcp_mem, |
| 777 | }, |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 778 | { } |
| 779 | }; |
| 780 | |
Pavel Emelyanov | 1577519 | 2008-03-26 01:54:18 -0700 | [diff] [blame] | 781 | static __net_init int ipv4_sysctl_init_net(struct net *net) |
| 782 | { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 783 | struct ctl_table *table; |
| 784 | |
| 785 | table = ipv4_net_table; |
Octavian Purdila | 09ad9bc | 2009-11-25 15:14:13 -0800 | [diff] [blame] | 786 | if (!net_eq(net, &init_net)) { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 787 | table = kmemdup(table, sizeof(ipv4_net_table), GFP_KERNEL); |
| 788 | if (table == NULL) |
| 789 | goto err_alloc; |
| 790 | |
| 791 | table[0].data = |
| 792 | &net->ipv4.sysctl_icmp_echo_ignore_all; |
| 793 | table[1].data = |
| 794 | &net->ipv4.sysctl_icmp_echo_ignore_broadcasts; |
| 795 | table[2].data = |
| 796 | &net->ipv4.sysctl_icmp_ignore_bogus_error_responses; |
| 797 | table[3].data = |
| 798 | &net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr; |
| 799 | table[4].data = |
| 800 | &net->ipv4.sysctl_icmp_ratelimit; |
| 801 | table[5].data = |
| 802 | &net->ipv4.sysctl_icmp_ratemask; |
Neil Horman | 1080d70 | 2008-10-27 12:28:25 -0700 | [diff] [blame] | 803 | table[6].data = |
| 804 | &net->ipv4.sysctl_rt_cache_rebuild_count; |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 805 | table[7].data = |
| 806 | &net->ipv4.sysctl_ping_group_range; |
| 807 | |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 808 | } |
| 809 | |
Vasiliy Kulikov | c319b4d | 2011-05-13 10:01:00 +0000 | [diff] [blame] | 810 | /* |
| 811 | * Sane defaults - nobody may create ping sockets. |
| 812 | * Boot scripts should set this to distro-specific group. |
| 813 | */ |
| 814 | net->ipv4.sysctl_ping_group_range[0] = 1; |
| 815 | net->ipv4.sysctl_ping_group_range[1] = 0; |
| 816 | |
Neil Horman | 1080d70 | 2008-10-27 12:28:25 -0700 | [diff] [blame] | 817 | net->ipv4.sysctl_rt_cache_rebuild_count = 4; |
| 818 | |
Glauber Costa | 4acb419 | 2012-01-30 01:20:17 +0000 | [diff] [blame] | 819 | tcp_init_mem(net); |
Glauber Costa | 3dc43e3 | 2011-12-11 21:47:05 +0000 | [diff] [blame] | 820 | |
Eric W. Biederman | ec8f23c | 2012-04-19 13:44:49 +0000 | [diff] [blame] | 821 | net->ipv4.ipv4_hdr = register_net_sysctl(net, "net/ipv4", table); |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 822 | if (net->ipv4.ipv4_hdr == NULL) |
| 823 | goto err_reg; |
| 824 | |
Pavel Emelyanov | 1577519 | 2008-03-26 01:54:18 -0700 | [diff] [blame] | 825 | return 0; |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 826 | |
| 827 | err_reg: |
Octavian Purdila | 09ad9bc | 2009-11-25 15:14:13 -0800 | [diff] [blame] | 828 | if (!net_eq(net, &init_net)) |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 829 | kfree(table); |
| 830 | err_alloc: |
| 831 | return -ENOMEM; |
Pavel Emelyanov | 1577519 | 2008-03-26 01:54:18 -0700 | [diff] [blame] | 832 | } |
| 833 | |
| 834 | static __net_exit void ipv4_sysctl_exit_net(struct net *net) |
| 835 | { |
Pavel Emelyanov | 68528f0 | 2008-03-26 01:56:24 -0700 | [diff] [blame] | 836 | struct ctl_table *table; |
| 837 | |
| 838 | table = net->ipv4.ipv4_hdr->ctl_table_arg; |
| 839 | unregister_net_sysctl_table(net->ipv4.ipv4_hdr); |
| 840 | kfree(table); |
Pavel Emelyanov | 1577519 | 2008-03-26 01:54:18 -0700 | [diff] [blame] | 841 | } |
| 842 | |
| 843 | static __net_initdata struct pernet_operations ipv4_sysctl_ops = { |
| 844 | .init = ipv4_sysctl_init_net, |
| 845 | .exit = ipv4_sysctl_exit_net, |
| 846 | }; |
| 847 | |
Pavel Emelyanov | 3e37c3f | 2007-12-05 01:41:26 -0800 | [diff] [blame] | 848 | static __init int sysctl_ipv4_init(void) |
| 849 | { |
| 850 | struct ctl_table_header *hdr; |
Amerigo Wang | e3826f1 | 2010-05-05 00:27:06 +0000 | [diff] [blame] | 851 | struct ctl_table *i; |
| 852 | |
| 853 | for (i = ipv4_table; i->procname; i++) { |
| 854 | if (strcmp(i->procname, "ip_local_reserved_ports") == 0) { |
| 855 | i->data = sysctl_local_reserved_ports; |
| 856 | break; |
| 857 | } |
| 858 | } |
| 859 | if (!i->procname) |
| 860 | return -EINVAL; |
Pavel Emelyanov | 3e37c3f | 2007-12-05 01:41:26 -0800 | [diff] [blame] | 861 | |
Eric W. Biederman | ec8f23c | 2012-04-19 13:44:49 +0000 | [diff] [blame] | 862 | hdr = register_net_sysctl(&init_net, "net/ipv4", ipv4_table); |
Pavel Emelyanov | 1577519 | 2008-03-26 01:54:18 -0700 | [diff] [blame] | 863 | if (hdr == NULL) |
| 864 | return -ENOMEM; |
| 865 | |
| 866 | if (register_pernet_subsys(&ipv4_sysctl_ops)) { |
Eric W. Biederman | 5dd3df1 | 2012-04-19 13:24:33 +0000 | [diff] [blame] | 867 | unregister_net_sysctl_table(hdr); |
Pavel Emelyanov | 1577519 | 2008-03-26 01:54:18 -0700 | [diff] [blame] | 868 | return -ENOMEM; |
| 869 | } |
| 870 | |
| 871 | return 0; |
Pavel Emelyanov | 3e37c3f | 2007-12-05 01:41:26 -0800 | [diff] [blame] | 872 | } |
| 873 | |
| 874 | __initcall(sysctl_ipv4_init); |