aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c91
-rw-r--r--net/ipv6/icmp.c4
-rw-r--r--net/ipv6/ndisc.c39
-rw-r--r--net/ipv6/netfilter/ip6_queue.c4
-rw-r--r--net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c4
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c4
-rw-r--r--net/ipv6/reassembly.c6
-rw-r--r--net/ipv6/route.c18
-rw-r--r--net/ipv6/sysctl_net_ipv6.c12
-rw-r--r--net/ipv6/xfrm6_policy.c1
10 files changed, 19 insertions, 164 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b1ce8fc62049..de7a194a64ab 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4037,41 +4037,6 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write,
4037 return ret; 4037 return ret;
4038} 4038}
4039 4039
4040static int addrconf_sysctl_forward_strategy(ctl_table *table,
4041 void __user *oldval,
4042 size_t __user *oldlenp,
4043 void __user *newval, size_t newlen)
4044{
4045 int *valp = table->data;
4046 int val = *valp;
4047 int new;
4048
4049 if (!newval || !newlen)
4050 return 0;
4051 if (newlen != sizeof(int))
4052 return -EINVAL;
4053 if (get_user(new, (int __user *)newval))
4054 return -EFAULT;
4055 if (new == *valp)
4056 return 0;
4057 if (oldval && oldlenp) {
4058 size_t len;
4059 if (get_user(len, oldlenp))
4060 return -EFAULT;
4061 if (len) {
4062 if (len > table->maxlen)
4063 len = table->maxlen;
4064 if (copy_to_user(oldval, valp, len))
4065 return -EFAULT;
4066 if (put_user(len, oldlenp))
4067 return -EFAULT;
4068 }
4069 }
4070
4071 *valp = new;
4072 return addrconf_fixup_forwarding(table, valp, val);
4073}
4074
4075static void dev_disable_change(struct inet6_dev *idev) 4040static void dev_disable_change(struct inet6_dev *idev)
4076{ 4041{
4077 if (!idev || !idev->dev) 4042 if (!idev || !idev->dev)
@@ -4148,16 +4113,13 @@ static struct addrconf_sysctl_table
4148 .sysctl_header = NULL, 4113 .sysctl_header = NULL,
4149 .addrconf_vars = { 4114 .addrconf_vars = {
4150 { 4115 {
4151 .ctl_name = NET_IPV6_FORWARDING,
4152 .procname = "forwarding", 4116 .procname = "forwarding",
4153 .data = &ipv6_devconf.forwarding, 4117 .data = &ipv6_devconf.forwarding,
4154 .maxlen = sizeof(int), 4118 .maxlen = sizeof(int),
4155 .mode = 0644, 4119 .mode = 0644,
4156 .proc_handler = addrconf_sysctl_forward, 4120 .proc_handler = addrconf_sysctl_forward,
4157 .strategy = addrconf_sysctl_forward_strategy,
4158 }, 4121 },
4159 { 4122 {
4160 .ctl_name = NET_IPV6_HOP_LIMIT,
4161 .procname = "hop_limit", 4123 .procname = "hop_limit",
4162 .data = &ipv6_devconf.hop_limit, 4124 .data = &ipv6_devconf.hop_limit,
4163 .maxlen = sizeof(int), 4125 .maxlen = sizeof(int),
@@ -4165,7 +4127,6 @@ static struct addrconf_sysctl_table
4165 .proc_handler = proc_dointvec, 4127 .proc_handler = proc_dointvec,
4166 }, 4128 },
4167 { 4129 {
4168 .ctl_name = NET_IPV6_MTU,
4169 .procname = "mtu", 4130 .procname = "mtu",
4170 .data = &ipv6_devconf.mtu6, 4131 .data = &ipv6_devconf.mtu6,
4171 .maxlen = sizeof(int), 4132 .maxlen = sizeof(int),
@@ -4173,7 +4134,6 @@ static struct addrconf_sysctl_table
4173 .proc_handler = proc_dointvec, 4134 .proc_handler = proc_dointvec,
4174 }, 4135 },
4175 { 4136 {
4176 .ctl_name = NET_IPV6_ACCEPT_RA,
4177 .procname = "accept_ra", 4137 .procname = "accept_ra",
4178 .data = &ipv6_devconf.accept_ra, 4138 .data = &ipv6_devconf.accept_ra,
4179 .maxlen = sizeof(int), 4139 .maxlen = sizeof(int),
@@ -4181,7 +4141,6 @@ static struct addrconf_sysctl_table
4181 .proc_handler = proc_dointvec, 4141 .proc_handler = proc_dointvec,
4182 }, 4142 },
4183 { 4143 {
4184 .ctl_name = NET_IPV6_ACCEPT_REDIRECTS,
4185 .procname = "accept_redirects", 4144 .procname = "accept_redirects",
4186 .data = &ipv6_devconf.accept_redirects, 4145 .data = &ipv6_devconf.accept_redirects,
4187 .maxlen = sizeof(int), 4146 .maxlen = sizeof(int),
@@ -4189,7 +4148,6 @@ static struct addrconf_sysctl_table
4189 .proc_handler = proc_dointvec, 4148 .proc_handler = proc_dointvec,
4190 }, 4149 },
4191 { 4150 {
4192 .ctl_name = NET_IPV6_AUTOCONF,
4193 .procname = "autoconf", 4151 .procname = "autoconf",
4194 .data = &ipv6_devconf.autoconf, 4152 .data = &ipv6_devconf.autoconf,
4195 .maxlen = sizeof(int), 4153 .maxlen = sizeof(int),
@@ -4197,7 +4155,6 @@ static struct addrconf_sysctl_table
4197 .proc_handler = proc_dointvec, 4155 .proc_handler = proc_dointvec,
4198 }, 4156 },
4199 { 4157 {
4200 .ctl_name = NET_IPV6_DAD_TRANSMITS,
4201 .procname = "dad_transmits", 4158 .procname = "dad_transmits",
4202 .data = &ipv6_devconf.dad_transmits, 4159 .data = &ipv6_devconf.dad_transmits,
4203 .maxlen = sizeof(int), 4160 .maxlen = sizeof(int),
@@ -4205,7 +4162,6 @@ static struct addrconf_sysctl_table
4205 .proc_handler = proc_dointvec, 4162 .proc_handler = proc_dointvec,
4206 }, 4163 },
4207 { 4164 {
4208 .ctl_name = NET_IPV6_RTR_SOLICITS,
4209 .procname = "router_solicitations", 4165 .procname = "router_solicitations",
4210 .data = &ipv6_devconf.rtr_solicits, 4166 .data = &ipv6_devconf.rtr_solicits,
4211 .maxlen = sizeof(int), 4167 .maxlen = sizeof(int),
@@ -4213,25 +4169,20 @@ static struct addrconf_sysctl_table
4213 .proc_handler = proc_dointvec, 4169 .proc_handler = proc_dointvec,
4214 }, 4170 },
4215 { 4171 {
4216 .ctl_name = NET_IPV6_RTR_SOLICIT_INTERVAL,
4217 .procname = "router_solicitation_interval", 4172 .procname = "router_solicitation_interval",
4218 .data = &ipv6_devconf.rtr_solicit_interval, 4173 .data = &ipv6_devconf.rtr_solicit_interval,
4219 .maxlen = sizeof(int), 4174 .maxlen = sizeof(int),
4220 .mode = 0644, 4175 .mode = 0644,
4221 .proc_handler = proc_dointvec_jiffies, 4176 .proc_handler = proc_dointvec_jiffies,
4222 .strategy = sysctl_jiffies,
4223 }, 4177 },
4224 { 4178 {
4225 .ctl_name = NET_IPV6_RTR_SOLICIT_DELAY,
4226 .procname = "router_solicitation_delay", 4179 .procname = "router_solicitation_delay",
4227 .data = &ipv6_devconf.rtr_solicit_delay, 4180 .data = &ipv6_devconf.rtr_solicit_delay,
4228 .maxlen = sizeof(int), 4181 .maxlen = sizeof(int),
4229 .mode = 0644, 4182 .mode = 0644,
4230 .proc_handler = proc_dointvec_jiffies, 4183 .proc_handler = proc_dointvec_jiffies,
4231 .strategy = sysctl_jiffies,
4232 }, 4184 },
4233 { 4185 {
4234 .ctl_name = NET_IPV6_FORCE_MLD_VERSION,
4235 .procname = "force_mld_version", 4186 .procname = "force_mld_version",
4236 .data = &ipv6_devconf.force_mld_version, 4187 .data = &ipv6_devconf.force_mld_version,
4237 .maxlen = sizeof(int), 4188 .maxlen = sizeof(int),
@@ -4240,7 +4191,6 @@ static struct addrconf_sysctl_table
4240 }, 4191 },
4241#ifdef CONFIG_IPV6_PRIVACY 4192#ifdef CONFIG_IPV6_PRIVACY
4242 { 4193 {
4243 .ctl_name = NET_IPV6_USE_TEMPADDR,
4244 .procname = "use_tempaddr", 4194 .procname = "use_tempaddr",
4245 .data = &ipv6_devconf.use_tempaddr, 4195 .data = &ipv6_devconf.use_tempaddr,
4246 .maxlen = sizeof(int), 4196 .maxlen = sizeof(int),
@@ -4248,7 +4198,6 @@ static struct addrconf_sysctl_table
4248 .proc_handler = proc_dointvec, 4198 .proc_handler = proc_dointvec,
4249 }, 4199 },
4250 { 4200 {
4251 .ctl_name = NET_IPV6_TEMP_VALID_LFT,
4252 .procname = "temp_valid_lft", 4201 .procname = "temp_valid_lft",
4253 .data = &ipv6_devconf.temp_valid_lft, 4202 .data = &ipv6_devconf.temp_valid_lft,
4254 .maxlen = sizeof(int), 4203 .maxlen = sizeof(int),
@@ -4256,7 +4205,6 @@ static struct addrconf_sysctl_table
4256 .proc_handler = proc_dointvec, 4205 .proc_handler = proc_dointvec,
4257 }, 4206 },
4258 { 4207 {
4259 .ctl_name = NET_IPV6_TEMP_PREFERED_LFT,
4260 .procname = "temp_prefered_lft", 4208 .procname = "temp_prefered_lft",
4261 .data = &ipv6_devconf.temp_prefered_lft, 4209 .data = &ipv6_devconf.temp_prefered_lft,
4262 .maxlen = sizeof(int), 4210 .maxlen = sizeof(int),
@@ -4264,7 +4212,6 @@ static struct addrconf_sysctl_table
4264 .proc_handler = proc_dointvec, 4212 .proc_handler = proc_dointvec,
4265 }, 4213 },
4266 { 4214 {
4267 .ctl_name = NET_IPV6_REGEN_MAX_RETRY,
4268 .procname = "regen_max_retry", 4215 .procname = "regen_max_retry",
4269 .data = &ipv6_devconf.regen_max_retry, 4216 .data = &ipv6_devconf.regen_max_retry,
4270 .maxlen = sizeof(int), 4217 .maxlen = sizeof(int),
@@ -4272,7 +4219,6 @@ static struct addrconf_sysctl_table
4272 .proc_handler = proc_dointvec, 4219 .proc_handler = proc_dointvec,
4273 }, 4220 },
4274 { 4221 {
4275 .ctl_name = NET_IPV6_MAX_DESYNC_FACTOR,
4276 .procname = "max_desync_factor", 4222 .procname = "max_desync_factor",
4277 .data = &ipv6_devconf.max_desync_factor, 4223 .data = &ipv6_devconf.max_desync_factor,
4278 .maxlen = sizeof(int), 4224 .maxlen = sizeof(int),
@@ -4281,7 +4227,6 @@ static struct addrconf_sysctl_table
4281 }, 4227 },
4282#endif 4228#endif
4283 { 4229 {
4284 .ctl_name = NET_IPV6_MAX_ADDRESSES,
4285 .procname = "max_addresses", 4230 .procname = "max_addresses",
4286 .data = &ipv6_devconf.max_addresses, 4231 .data = &ipv6_devconf.max_addresses,
4287 .maxlen = sizeof(int), 4232 .maxlen = sizeof(int),
@@ -4289,7 +4234,6 @@ static struct addrconf_sysctl_table
4289 .proc_handler = proc_dointvec, 4234 .proc_handler = proc_dointvec,
4290 }, 4235 },
4291 { 4236 {
4292 .ctl_name = NET_IPV6_ACCEPT_RA_DEFRTR,
4293 .procname = "accept_ra_defrtr", 4237 .procname = "accept_ra_defrtr",
4294 .data = &ipv6_devconf.accept_ra_defrtr, 4238 .data = &ipv6_devconf.accept_ra_defrtr,
4295 .maxlen = sizeof(int), 4239 .maxlen = sizeof(int),
@@ -4297,7 +4241,6 @@ static struct addrconf_sysctl_table
4297 .proc_handler = proc_dointvec, 4241 .proc_handler = proc_dointvec,
4298 }, 4242 },
4299 { 4243 {
4300 .ctl_name = NET_IPV6_ACCEPT_RA_PINFO,
4301 .procname = "accept_ra_pinfo", 4244 .procname = "accept_ra_pinfo",
4302 .data = &ipv6_devconf.accept_ra_pinfo, 4245 .data = &ipv6_devconf.accept_ra_pinfo,
4303 .maxlen = sizeof(int), 4246 .maxlen = sizeof(int),
@@ -4306,7 +4249,6 @@ static struct addrconf_sysctl_table
4306 }, 4249 },
4307#ifdef CONFIG_IPV6_ROUTER_PREF 4250#ifdef CONFIG_IPV6_ROUTER_PREF
4308 { 4251 {
4309 .ctl_name = NET_IPV6_ACCEPT_RA_RTR_PREF,
4310 .procname = "accept_ra_rtr_pref", 4252 .procname = "accept_ra_rtr_pref",
4311 .data = &ipv6_devconf.accept_ra_rtr_pref, 4253 .data = &ipv6_devconf.accept_ra_rtr_pref,
4312 .maxlen = sizeof(int), 4254 .maxlen = sizeof(int),
@@ -4314,17 +4256,14 @@ static struct addrconf_sysctl_table
4314 .proc_handler = proc_dointvec, 4256 .proc_handler = proc_dointvec,
4315 }, 4257 },
4316 { 4258 {
4317 .ctl_name = NET_IPV6_RTR_PROBE_INTERVAL,
4318 .procname = "router_probe_interval", 4259 .procname = "router_probe_interval",
4319 .data = &ipv6_devconf.rtr_probe_interval, 4260 .data = &ipv6_devconf.rtr_probe_interval,
4320 .maxlen = sizeof(int), 4261 .maxlen = sizeof(int),
4321 .mode = 0644, 4262 .mode = 0644,
4322 .proc_handler = proc_dointvec_jiffies, 4263 .proc_handler = proc_dointvec_jiffies,
4323 .strategy = sysctl_jiffies,
4324 }, 4264 },
4325#ifdef CONFIG_IPV6_ROUTE_INFO 4265#ifdef CONFIG_IPV6_ROUTE_INFO
4326 { 4266 {
4327 .ctl_name = NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN,
4328 .procname = "accept_ra_rt_info_max_plen", 4267 .procname = "accept_ra_rt_info_max_plen",
4329 .data = &ipv6_devconf.accept_ra_rt_info_max_plen, 4268 .data = &ipv6_devconf.accept_ra_rt_info_max_plen,
4330 .maxlen = sizeof(int), 4269 .maxlen = sizeof(int),
@@ -4334,7 +4273,6 @@ static struct addrconf_sysctl_table
4334#endif 4273#endif
4335#endif 4274#endif
4336 { 4275 {
4337 .ctl_name = NET_IPV6_PROXY_NDP,
4338 .procname = "proxy_ndp", 4276 .procname = "proxy_ndp",
4339 .data = &ipv6_devconf.proxy_ndp, 4277 .data = &ipv6_devconf.proxy_ndp,
4340 .maxlen = sizeof(int), 4278 .maxlen = sizeof(int),
@@ -4342,7 +4280,6 @@ static struct addrconf_sysctl_table
4342 .proc_handler = proc_dointvec, 4280 .proc_handler = proc_dointvec,
4343 }, 4281 },
4344 { 4282 {
4345 .ctl_name = NET_IPV6_ACCEPT_SOURCE_ROUTE,
4346 .procname = "accept_source_route", 4283 .procname = "accept_source_route",
4347 .data = &ipv6_devconf.accept_source_route, 4284 .data = &ipv6_devconf.accept_source_route,
4348 .maxlen = sizeof(int), 4285 .maxlen = sizeof(int),
@@ -4351,7 +4288,6 @@ static struct addrconf_sysctl_table
4351 }, 4288 },
4352#ifdef CONFIG_IPV6_OPTIMISTIC_DAD 4289#ifdef CONFIG_IPV6_OPTIMISTIC_DAD
4353 { 4290 {
4354 .ctl_name = CTL_UNNUMBERED,
4355 .procname = "optimistic_dad", 4291 .procname = "optimistic_dad",
4356 .data = &ipv6_devconf.optimistic_dad, 4292 .data = &ipv6_devconf.optimistic_dad,
4357 .maxlen = sizeof(int), 4293 .maxlen = sizeof(int),
@@ -4362,7 +4298,6 @@ static struct addrconf_sysctl_table
4362#endif 4298#endif
4363#ifdef CONFIG_IPV6_MROUTE 4299#ifdef CONFIG_IPV6_MROUTE
4364 { 4300 {
4365 .ctl_name = CTL_UNNUMBERED,
4366 .procname = "mc_forwarding", 4301 .procname = "mc_forwarding",
4367 .data = &ipv6_devconf.mc_forwarding, 4302 .data = &ipv6_devconf.mc_forwarding,
4368 .maxlen = sizeof(int), 4303 .maxlen = sizeof(int),
@@ -4371,16 +4306,13 @@ static struct addrconf_sysctl_table
4371 }, 4306 },
4372#endif 4307#endif
4373 { 4308 {
4374 .ctl_name = CTL_UNNUMBERED,
4375 .procname = "disable_ipv6", 4309 .procname = "disable_ipv6",
4376 .data = &ipv6_devconf.disable_ipv6, 4310 .data = &ipv6_devconf.disable_ipv6,
4377 .maxlen = sizeof(int), 4311 .maxlen = sizeof(int),
4378 .mode = 0644, 4312 .mode = 0644,
4379 .proc_handler = addrconf_sysctl_disable, 4313 .proc_handler = addrconf_sysctl_disable,
4380 .strategy = sysctl_intvec,
4381 }, 4314 },
4382 { 4315 {
4383 .ctl_name = CTL_UNNUMBERED,
4384 .procname = "accept_dad", 4316 .procname = "accept_dad",
4385 .data = &ipv6_devconf.accept_dad, 4317 .data = &ipv6_devconf.accept_dad,
4386 .maxlen = sizeof(int), 4318 .maxlen = sizeof(int),
@@ -4388,7 +4320,6 @@ static struct addrconf_sysctl_table
4388 .proc_handler = proc_dointvec, 4320 .proc_handler = proc_dointvec,
4389 }, 4321 },
4390 { 4322 {
4391 .ctl_name = CTL_UNNUMBERED,
4392 .procname = "force_tllao", 4323 .procname = "force_tllao",
4393 .data = &ipv6_devconf.force_tllao, 4324 .data = &ipv6_devconf.force_tllao,
4394 .maxlen = sizeof(int), 4325 .maxlen = sizeof(int),
@@ -4396,13 +4327,13 @@ static struct addrconf_sysctl_table
4396 .proc_handler = proc_dointvec 4327 .proc_handler = proc_dointvec
4397 }, 4328 },
4398 { 4329 {
4399 .ctl_name = 0, /* sentinel */ 4330 /* sentinel */
4400 } 4331 }
4401 }, 4332 },
4402}; 4333};
4403 4334
4404static int __addrconf_sysctl_register(struct net *net, char *dev_name, 4335static int __addrconf_sysctl_register(struct net *net, char *dev_name,
4405 int ctl_name, struct inet6_dev *idev, struct ipv6_devconf *p) 4336 struct inet6_dev *idev, struct ipv6_devconf *p)
4406{ 4337{
4407 int i; 4338 int i;
4408 struct addrconf_sysctl_table *t; 4339 struct addrconf_sysctl_table *t;
@@ -4410,9 +4341,9 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name,
4410#define ADDRCONF_CTL_PATH_DEV 3 4341#define ADDRCONF_CTL_PATH_DEV 3
4411 4342
4412 struct ctl_path addrconf_ctl_path[] = { 4343 struct ctl_path addrconf_ctl_path[] = {
4413 { .procname = "net", .ctl_name = CTL_NET, }, 4344 { .procname = "net", },
4414 { .procname = "ipv6", .ctl_name = NET_IPV6, }, 4345 { .procname = "ipv6", },
4415 { .procname = "conf", .ctl_name = NET_IPV6_CONF, }, 4346 { .procname = "conf", },
4416 { /* to be set */ }, 4347 { /* to be set */ },
4417 { }, 4348 { },
4418 }; 4349 };
@@ -4438,7 +4369,6 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name,
4438 goto free; 4369 goto free;
4439 4370
4440 addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].procname = t->dev_name; 4371 addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].procname = t->dev_name;
4441 addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].ctl_name = ctl_name;
4442 4372
4443 t->sysctl_header = register_net_sysctl_table(net, addrconf_ctl_path, 4373 t->sysctl_header = register_net_sysctl_table(net, addrconf_ctl_path,
4444 t->addrconf_vars); 4374 t->addrconf_vars);
@@ -4474,10 +4404,9 @@ static void addrconf_sysctl_register(struct inet6_dev *idev)
4474{ 4404{
4475 neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, 4405 neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6,
4476 NET_IPV6_NEIGH, "ipv6", 4406 NET_IPV6_NEIGH, "ipv6",
4477 &ndisc_ifinfo_sysctl_change, 4407 &ndisc_ifinfo_sysctl_change);
4478 ndisc_ifinfo_sysctl_strategy);
4479 __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, 4408 __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name,
4480 idev->dev->ifindex, idev, &idev->cnf); 4409 idev, &idev->cnf);
4481} 4410}
4482 4411
4483static void addrconf_sysctl_unregister(struct inet6_dev *idev) 4412static void addrconf_sysctl_unregister(struct inet6_dev *idev)
@@ -4516,13 +4445,11 @@ static int addrconf_init_net(struct net *net)
4516 net->ipv6.devconf_dflt = dflt; 4445 net->ipv6.devconf_dflt = dflt;
4517 4446
4518#ifdef CONFIG_SYSCTL 4447#ifdef CONFIG_SYSCTL
4519 err = __addrconf_sysctl_register(net, "all", NET_PROTO_CONF_ALL, 4448 err = __addrconf_sysctl_register(net, "all", NULL, all);
4520 NULL, all);
4521 if (err < 0) 4449 if (err < 0)
4522 goto err_reg_all; 4450 goto err_reg_all;
4523 4451
4524 err = __addrconf_sysctl_register(net, "default", NET_PROTO_CONF_DEFAULT, 4452 err = __addrconf_sysctl_register(net, "default", NULL, dflt);
4525 NULL, dflt);
4526 if (err < 0) 4453 if (err < 0)
4527 goto err_reg_dflt; 4454 goto err_reg_dflt;
4528#endif 4455#endif
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index f23ebbec0631..4ae661bc3677 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -942,15 +942,13 @@ EXPORT_SYMBOL(icmpv6_err_convert);
942#ifdef CONFIG_SYSCTL 942#ifdef CONFIG_SYSCTL
943ctl_table ipv6_icmp_table_template[] = { 943ctl_table ipv6_icmp_table_template[] = {
944 { 944 {
945 .ctl_name = NET_IPV6_ICMP_RATELIMIT,
946 .procname = "ratelimit", 945 .procname = "ratelimit",
947 .data = &init_net.ipv6.sysctl.icmpv6_time, 946 .data = &init_net.ipv6.sysctl.icmpv6_time,
948 .maxlen = sizeof(int), 947 .maxlen = sizeof(int),
949 .mode = 0644, 948 .mode = 0644,
950 .proc_handler = proc_dointvec_ms_jiffies, 949 .proc_handler = proc_dointvec_ms_jiffies,
951 .strategy = sysctl_ms_jiffies
952 }, 950 },
953 { .ctl_name = 0 }, 951 { },
954}; 952};
955 953
956struct ctl_table *ipv6_icmp_sysctl_init(struct net *net) 954struct ctl_table *ipv6_icmp_sysctl_init(struct net *net)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 3507cfe1e7a2..c45852798092 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1769,42 +1769,6 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *bu
1769 return ret; 1769 return ret;
1770} 1770}
1771 1771
1772int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl,
1773 void __user *oldval, size_t __user *oldlenp,
1774 void __user *newval, size_t newlen)
1775{
1776 struct net_device *dev = ctl->extra1;
1777 struct inet6_dev *idev;
1778 int ret;
1779
1780 if (ctl->ctl_name == NET_NEIGH_RETRANS_TIME ||
1781 ctl->ctl_name == NET_NEIGH_REACHABLE_TIME)
1782 ndisc_warn_deprecated_sysctl(ctl, "procfs", dev ? dev->name : "default");
1783
1784 switch (ctl->ctl_name) {
1785 case NET_NEIGH_REACHABLE_TIME:
1786 ret = sysctl_jiffies(ctl, oldval, oldlenp, newval, newlen);
1787 break;
1788 case NET_NEIGH_RETRANS_TIME_MS:
1789 case NET_NEIGH_REACHABLE_TIME_MS:
1790 ret = sysctl_ms_jiffies(ctl, oldval, oldlenp, newval, newlen);
1791 break;
1792 default:
1793 ret = 0;
1794 }
1795
1796 if (newval && newlen && ret > 0 &&
1797 dev && (idev = in6_dev_get(dev)) != NULL) {
1798 if (ctl->ctl_name == NET_NEIGH_REACHABLE_TIME ||
1799 ctl->ctl_name == NET_NEIGH_REACHABLE_TIME_MS)
1800 idev->nd_parms->reachable_time = neigh_rand_reach_time(idev->nd_parms->base_reachable_time);
1801 idev->tstamp = jiffies;
1802 inet6_ifinfo_notify(RTM_NEWLINK, idev);
1803 in6_dev_put(idev);
1804 }
1805
1806 return ret;
1807}
1808 1772
1809#endif 1773#endif
1810 1774
@@ -1858,8 +1822,7 @@ int __init ndisc_init(void)
1858#ifdef CONFIG_SYSCTL 1822#ifdef CONFIG_SYSCTL
1859 err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, 1823 err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6,
1860 NET_IPV6_NEIGH, "ipv6", 1824 NET_IPV6_NEIGH, "ipv6",
1861 &ndisc_ifinfo_sysctl_change, 1825 &ndisc_ifinfo_sysctl_change);
1862 &ndisc_ifinfo_sysctl_strategy);
1863 if (err) 1826 if (err)
1864 goto out_unregister_pernet; 1827 goto out_unregister_pernet;
1865#endif 1828#endif
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index db4d5725cce8..7854052be60b 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -36,7 +36,6 @@
36 36
37#define IPQ_QMAX_DEFAULT 1024 37#define IPQ_QMAX_DEFAULT 1024
38#define IPQ_PROC_FS_NAME "ip6_queue" 38#define IPQ_PROC_FS_NAME "ip6_queue"
39#define NET_IPQ_QMAX 2088
40#define NET_IPQ_QMAX_NAME "ip6_queue_maxlen" 39#define NET_IPQ_QMAX_NAME "ip6_queue_maxlen"
41 40
42typedef int (*ipq_cmpfn)(struct nf_queue_entry *, unsigned long); 41typedef int (*ipq_cmpfn)(struct nf_queue_entry *, unsigned long);
@@ -517,14 +516,13 @@ static struct ctl_table_header *ipq_sysctl_header;
517 516
518static ctl_table ipq_table[] = { 517static ctl_table ipq_table[] = {
519 { 518 {
520 .ctl_name = NET_IPQ_QMAX,
521 .procname = NET_IPQ_QMAX_NAME, 519 .procname = NET_IPQ_QMAX_NAME,
522 .data = &queue_maxlen, 520 .data = &queue_maxlen,
523 .maxlen = sizeof(queue_maxlen), 521 .maxlen = sizeof(queue_maxlen),
524 .mode = 0644, 522 .mode = 0644,
525 .proc_handler = proc_dointvec 523 .proc_handler = proc_dointvec
526 }, 524 },
527 { .ctl_name = 0 } 525 { }
528}; 526};
529#endif 527#endif
530 528
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
index 0f3df45718ac..c7b8bd1d7984 100644
--- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
@@ -277,9 +277,7 @@ static struct ctl_table icmpv6_sysctl_table[] = {
277 .mode = 0644, 277 .mode = 0644,
278 .proc_handler = proc_dointvec_jiffies, 278 .proc_handler = proc_dointvec_jiffies,
279 }, 279 },
280 { 280 { }
281 .ctl_name = 0
282 }
283}; 281};
284#endif /* CONFIG_SYSCTL */ 282#endif /* CONFIG_SYSCTL */
285 283
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index f3aba255ad9f..e0b9424fa1b2 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -83,7 +83,6 @@ struct ctl_table nf_ct_ipv6_sysctl_table[] = {
83 .proc_handler = proc_dointvec_jiffies, 83 .proc_handler = proc_dointvec_jiffies,
84 }, 84 },
85 { 85 {
86 .ctl_name = NET_NF_CONNTRACK_FRAG6_LOW_THRESH,
87 .procname = "nf_conntrack_frag6_low_thresh", 86 .procname = "nf_conntrack_frag6_low_thresh",
88 .data = &nf_init_frags.low_thresh, 87 .data = &nf_init_frags.low_thresh,
89 .maxlen = sizeof(unsigned int), 88 .maxlen = sizeof(unsigned int),
@@ -91,14 +90,13 @@ struct ctl_table nf_ct_ipv6_sysctl_table[] = {
91 .proc_handler = proc_dointvec, 90 .proc_handler = proc_dointvec,
92 }, 91 },
93 { 92 {
94 .ctl_name = NET_NF_CONNTRACK_FRAG6_HIGH_THRESH,
95 .procname = "nf_conntrack_frag6_high_thresh", 93 .procname = "nf_conntrack_frag6_high_thresh",
96 .data = &nf_init_frags.high_thresh, 94 .data = &nf_init_frags.high_thresh,
97 .maxlen = sizeof(unsigned int), 95 .maxlen = sizeof(unsigned int),
98 .mode = 0644, 96 .mode = 0644,
99 .proc_handler = proc_dointvec, 97 .proc_handler = proc_dointvec,
100 }, 98 },
101 { .ctl_name = 0 } 99 { }
102}; 100};
103#endif 101#endif
104 102
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 45efc39753e2..4d98549a6868 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -635,7 +635,6 @@ static const struct inet6_protocol frag_protocol =
635#ifdef CONFIG_SYSCTL 635#ifdef CONFIG_SYSCTL
636static struct ctl_table ip6_frags_ns_ctl_table[] = { 636static struct ctl_table ip6_frags_ns_ctl_table[] = {
637 { 637 {
638 .ctl_name = NET_IPV6_IP6FRAG_HIGH_THRESH,
639 .procname = "ip6frag_high_thresh", 638 .procname = "ip6frag_high_thresh",
640 .data = &init_net.ipv6.frags.high_thresh, 639 .data = &init_net.ipv6.frags.high_thresh,
641 .maxlen = sizeof(int), 640 .maxlen = sizeof(int),
@@ -643,7 +642,6 @@ static struct ctl_table ip6_frags_ns_ctl_table[] = {
643 .proc_handler = proc_dointvec 642 .proc_handler = proc_dointvec
644 }, 643 },
645 { 644 {
646 .ctl_name = NET_IPV6_IP6FRAG_LOW_THRESH,
647 .procname = "ip6frag_low_thresh", 645 .procname = "ip6frag_low_thresh",
648 .data = &init_net.ipv6.frags.low_thresh, 646 .data = &init_net.ipv6.frags.low_thresh,
649 .maxlen = sizeof(int), 647 .maxlen = sizeof(int),
@@ -651,26 +649,22 @@ static struct ctl_table ip6_frags_ns_ctl_table[] = {
651 .proc_handler = proc_dointvec 649 .proc_handler = proc_dointvec
652 }, 650 },
653 { 651 {
654 .ctl_name = NET_IPV6_IP6FRAG_TIME,
655 .procname = "ip6frag_time", 652 .procname = "ip6frag_time",
656 .data = &init_net.ipv6.frags.timeout, 653 .data = &init_net.ipv6.frags.timeout,
657 .maxlen = sizeof(int), 654 .maxlen = sizeof(int),
658 .mode = 0644, 655 .mode = 0644,
659 .proc_handler = proc_dointvec_jiffies, 656 .proc_handler = proc_dointvec_jiffies,
660 .strategy = sysctl_jiffies,
661 }, 657 },
662 { } 658 { }
663}; 659};
664 660
665static struct ctl_table ip6_frags_ctl_table[] = { 661static struct ctl_table ip6_frags_ctl_table[] = {
666 { 662 {
667 .ctl_name = NET_IPV6_IP6FRAG_SECRET_INTERVAL,
668 .procname = "ip6frag_secret_interval", 663 .procname = "ip6frag_secret_interval",
669 .data = &ip6_frags.secret_interval, 664 .data = &ip6_frags.secret_interval,
670 .maxlen = sizeof(int), 665 .maxlen = sizeof(int),
671 .mode = 0644, 666 .mode = 0644,
672 .proc_handler = proc_dointvec_jiffies, 667 .proc_handler = proc_dointvec_jiffies,
673 .strategy = sysctl_jiffies
674 }, 668 },
675 { } 669 { }
676}; 670};
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index df9432a46ffc..db3b27303890 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2547,7 +2547,6 @@ ctl_table ipv6_route_table_template[] = {
2547 .proc_handler = ipv6_sysctl_rtcache_flush 2547 .proc_handler = ipv6_sysctl_rtcache_flush
2548 }, 2548 },
2549 { 2549 {
2550 .ctl_name = NET_IPV6_ROUTE_GC_THRESH,
2551 .procname = "gc_thresh", 2550 .procname = "gc_thresh",
2552 .data = &ip6_dst_ops_template.gc_thresh, 2551 .data = &ip6_dst_ops_template.gc_thresh,
2553 .maxlen = sizeof(int), 2552 .maxlen = sizeof(int),
@@ -2555,7 +2554,6 @@ ctl_table ipv6_route_table_template[] = {
2555 .proc_handler = proc_dointvec, 2554 .proc_handler = proc_dointvec,
2556 }, 2555 },
2557 { 2556 {
2558 .ctl_name = NET_IPV6_ROUTE_MAX_SIZE,
2559 .procname = "max_size", 2557 .procname = "max_size",
2560 .data = &init_net.ipv6.sysctl.ip6_rt_max_size, 2558 .data = &init_net.ipv6.sysctl.ip6_rt_max_size,
2561 .maxlen = sizeof(int), 2559 .maxlen = sizeof(int),
@@ -2563,69 +2561,55 @@ ctl_table ipv6_route_table_template[] = {
2563 .proc_handler = proc_dointvec, 2561 .proc_handler = proc_dointvec,
2564 }, 2562 },
2565 { 2563 {
2566 .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL,
2567 .procname = "gc_min_interval", 2564 .procname = "gc_min_interval",
2568 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval, 2565 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval,
2569 .maxlen = sizeof(int), 2566 .maxlen = sizeof(int),
2570 .mode = 0644, 2567 .mode = 0644,
2571 .proc_handler = proc_dointvec_jiffies, 2568 .proc_handler = proc_dointvec_jiffies,
2572 .strategy = sysctl_jiffies,
2573 }, 2569 },
2574 { 2570 {
2575 .ctl_name = NET_IPV6_ROUTE_GC_TIMEOUT,
2576 .procname = "gc_timeout", 2571 .procname = "gc_timeout",
2577 .data = &init_net.ipv6.sysctl.ip6_rt_gc_timeout, 2572 .data = &init_net.ipv6.sysctl.ip6_rt_gc_timeout,
2578 .maxlen = sizeof(int), 2573 .maxlen = sizeof(int),
2579 .mode = 0644, 2574 .mode = 0644,
2580 .proc_handler = proc_dointvec_jiffies, 2575 .proc_handler = proc_dointvec_jiffies,
2581 .strategy = sysctl_jiffies,
2582 }, 2576 },
2583 { 2577 {
2584 .ctl_name = NET_IPV6_ROUTE_GC_INTERVAL,
2585 .procname = "gc_interval", 2578 .procname = "gc_interval",
2586 .data = &init_net.ipv6.sysctl.ip6_rt_gc_interval, 2579 .data = &init_net.ipv6.sysctl.ip6_rt_gc_interval,
2587 .maxlen = sizeof(int), 2580 .maxlen = sizeof(int),
2588 .mode = 0644, 2581 .mode = 0644,
2589 .proc_handler = proc_dointvec_jiffies, 2582 .proc_handler = proc_dointvec_jiffies,
2590 .strategy = sysctl_jiffies,
2591 }, 2583 },
2592 { 2584 {
2593 .ctl_name = NET_IPV6_ROUTE_GC_ELASTICITY,
2594 .procname = "gc_elasticity", 2585 .procname = "gc_elasticity",
2595 .data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity, 2586 .data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity,
2596 .maxlen = sizeof(int), 2587 .maxlen = sizeof(int),
2597 .mode = 0644, 2588 .mode = 0644,
2598 .proc_handler = proc_dointvec_jiffies, 2589 .proc_handler = proc_dointvec_jiffies,
2599 .strategy = sysctl_jiffies,
2600 }, 2590 },
2601 { 2591 {
2602 .ctl_name = NET_IPV6_ROUTE_MTU_EXPIRES,
2603 .procname = "mtu_expires", 2592 .procname = "mtu_expires",
2604 .data = &init_net.ipv6.sysctl.ip6_rt_mtu_expires, 2593 .data = &init_net.ipv6.sysctl.ip6_rt_mtu_expires,
2605 .maxlen = sizeof(int), 2594 .maxlen = sizeof(int),
2606 .mode = 0644, 2595 .mode = 0644,
2607 .proc_handler = proc_dointvec_jiffies, 2596 .proc_handler = proc_dointvec_jiffies,
2608 .strategy = sysctl_jiffies,
2609 }, 2597 },
2610 { 2598 {
2611 .ctl_name = NET_IPV6_ROUTE_MIN_ADVMSS,
2612 .procname = "min_adv_mss", 2599 .procname = "min_adv_mss",
2613 .data = &init_net.ipv6.sysctl.ip6_rt_min_advmss, 2600 .data = &init_net.ipv6.sysctl.ip6_rt_min_advmss,
2614 .maxlen = sizeof(int), 2601 .maxlen = sizeof(int),
2615 .mode = 0644, 2602 .mode = 0644,
2616 .proc_handler = proc_dointvec_jiffies, 2603 .proc_handler = proc_dointvec_jiffies,
2617 .strategy = sysctl_jiffies,
2618 }, 2604 },
2619 { 2605 {
2620 .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS,
2621 .procname = "gc_min_interval_ms", 2606 .procname = "gc_min_interval_ms",
2622 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval, 2607 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval,
2623 .maxlen = sizeof(int), 2608 .maxlen = sizeof(int),
2624 .mode = 0644, 2609 .mode = 0644,
2625 .proc_handler = proc_dointvec_ms_jiffies, 2610 .proc_handler = proc_dointvec_ms_jiffies,
2626 .strategy = sysctl_ms_jiffies,
2627 }, 2611 },
2628 { .ctl_name = 0 } 2612 { }
2629}; 2613};
2630 2614
2631struct ctl_table *ipv6_route_sysctl_init(struct net *net) 2615struct ctl_table *ipv6_route_sysctl_init(struct net *net)
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 0dc6a4e5ed4a..c690736885b4 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -16,45 +16,41 @@
16 16
17static ctl_table ipv6_table_template[] = { 17static ctl_table ipv6_table_template[] = {
18 { 18 {
19 .ctl_name = NET_IPV6_ROUTE,
20 .procname = "route", 19 .procname = "route",
21 .maxlen = 0, 20 .maxlen = 0,
22 .mode = 0555, 21 .mode = 0555,
23 .child = ipv6_route_table_template 22 .child = ipv6_route_table_template
24 }, 23 },
25 { 24 {
26 .ctl_name = NET_IPV6_ICMP,
27 .procname = "icmp", 25 .procname = "icmp",
28 .maxlen = 0, 26 .maxlen = 0,
29 .mode = 0555, 27 .mode = 0555,
30 .child = ipv6_icmp_table_template 28 .child = ipv6_icmp_table_template
31 }, 29 },
32 { 30 {
33 .ctl_name = NET_IPV6_BINDV6ONLY,
34 .procname = "bindv6only", 31 .procname = "bindv6only",
35 .data = &init_net.ipv6.sysctl.bindv6only, 32 .data = &init_net.ipv6.sysctl.bindv6only,
36 .maxlen = sizeof(int), 33 .maxlen = sizeof(int),
37 .mode = 0644, 34 .mode = 0644,
38 .proc_handler = proc_dointvec 35 .proc_handler = proc_dointvec
39 }, 36 },
40 { .ctl_name = 0 } 37 { }
41}; 38};
42 39
43static ctl_table ipv6_rotable[] = { 40static ctl_table ipv6_rotable[] = {
44 { 41 {
45 .ctl_name = NET_IPV6_MLD_MAX_MSF,
46 .procname = "mld_max_msf", 42 .procname = "mld_max_msf",
47 .data = &sysctl_mld_max_msf, 43 .data = &sysctl_mld_max_msf,
48 .maxlen = sizeof(int), 44 .maxlen = sizeof(int),
49 .mode = 0644, 45 .mode = 0644,
50 .proc_handler = proc_dointvec 46 .proc_handler = proc_dointvec
51 }, 47 },
52 { .ctl_name = 0 } 48 { }
53}; 49};
54 50
55struct ctl_path net_ipv6_ctl_path[] = { 51struct ctl_path net_ipv6_ctl_path[] = {
56 { .procname = "net", .ctl_name = CTL_NET, }, 52 { .procname = "net", },
57 { .procname = "ipv6", .ctl_name = NET_IPV6, }, 53 { .procname = "ipv6", },
58 { }, 54 { },
59}; 55};
60EXPORT_SYMBOL_GPL(net_ipv6_ctl_path); 56EXPORT_SYMBOL_GPL(net_ipv6_ctl_path);
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 8ec3d45cd1d9..7254e3f899a7 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -309,7 +309,6 @@ static void xfrm6_policy_fini(void)
309#ifdef CONFIG_SYSCTL 309#ifdef CONFIG_SYSCTL
310static struct ctl_table xfrm6_policy_table[] = { 310static struct ctl_table xfrm6_policy_table[] = {
311 { 311 {
312 .ctl_name = CTL_UNNUMBERED,
313 .procname = "xfrm6_gc_thresh", 312 .procname = "xfrm6_gc_thresh",
314 .data = &xfrm6_dst_ops.gc_thresh, 313 .data = &xfrm6_dst_ops.gc_thresh,
315 .maxlen = sizeof(int), 314 .maxlen = sizeof(int),