aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c143
1 files changed, 78 insertions, 65 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 5f0043c30b70..0e1f4b2cd3dd 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3,7 +3,7 @@
3 * FIB front-end. 3 * FIB front-end.
4 * 4 *
5 * Authors: 5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt> 6 * Pedro Roque <roque@di.fc.ul.pt>
7 * 7 *
8 * $Id: route.c,v 1.56 2001/10/31 21:55:55 davem Exp $ 8 * $Id: route.c,v 1.56 2001/10/31 21:55:55 davem Exp $
9 * 9 *
@@ -201,7 +201,7 @@ static void ip6_dst_destroy(struct dst_entry *dst)
201 if (idev != NULL) { 201 if (idev != NULL) {
202 rt->rt6i_idev = NULL; 202 rt->rt6i_idev = NULL;
203 in6_dev_put(idev); 203 in6_dev_put(idev);
204 } 204 }
205} 205}
206 206
207static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev, 207static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
@@ -243,7 +243,7 @@ static __inline__ struct rt6_info *rt6_device_match(struct rt6_info *rt,
243 struct rt6_info *sprt; 243 struct rt6_info *sprt;
244 244
245 if (oif) { 245 if (oif) {
246 for (sprt = rt; sprt; sprt = sprt->u.next) { 246 for (sprt = rt; sprt; sprt = sprt->u.dst.rt6_next) {
247 struct net_device *dev = sprt->rt6i_dev; 247 struct net_device *dev = sprt->rt6i_dev;
248 if (dev->ifindex == oif) 248 if (dev->ifindex == oif)
249 return sprt; 249 return sprt;
@@ -252,7 +252,7 @@ static __inline__ struct rt6_info *rt6_device_match(struct rt6_info *rt,
252 sprt->rt6i_idev->dev->ifindex != oif) { 252 sprt->rt6i_idev->dev->ifindex != oif) {
253 if (strict && oif) 253 if (strict && oif)
254 continue; 254 continue;
255 if (local && (!oif || 255 if (local && (!oif ||
256 local->rt6i_idev->dev->ifindex == oif)) 256 local->rt6i_idev->dev->ifindex == oif))
257 continue; 257 continue;
258 } 258 }
@@ -311,12 +311,21 @@ static inline void rt6_probe(struct rt6_info *rt)
311static int inline rt6_check_dev(struct rt6_info *rt, int oif) 311static int inline rt6_check_dev(struct rt6_info *rt, int oif)
312{ 312{
313 struct net_device *dev = rt->rt6i_dev; 313 struct net_device *dev = rt->rt6i_dev;
314 if (!oif || dev->ifindex == oif) 314 int ret = 0;
315
316 if (!oif)
315 return 2; 317 return 2;
316 if ((dev->flags & IFF_LOOPBACK) && 318 if (dev->flags & IFF_LOOPBACK) {
317 rt->rt6i_idev && rt->rt6i_idev->dev->ifindex == oif) 319 if (!WARN_ON(rt->rt6i_idev == NULL) &&
318 return 1; 320 rt->rt6i_idev->dev->ifindex == oif)
319 return 0; 321 ret = 1;
322 else
323 return 0;
324 }
325 if (dev->ifindex == oif)
326 return 2;
327
328 return ret;
320} 329}
321 330
322static int inline rt6_check_neigh(struct rt6_info *rt) 331static int inline rt6_check_neigh(struct rt6_info *rt)
@@ -341,7 +350,7 @@ static int rt6_score_route(struct rt6_info *rt, int oif,
341 int strict) 350 int strict)
342{ 351{
343 int m, n; 352 int m, n;
344 353
345 m = rt6_check_dev(rt, oif); 354 m = rt6_check_dev(rt, oif);
346 if (!m && (strict & RT6_LOOKUP_F_IFACE)) 355 if (!m && (strict & RT6_LOOKUP_F_IFACE))
347 return -1; 356 return -1;
@@ -367,7 +376,7 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif,
367 376
368 for (rt = rt0, metric = rt0->rt6i_metric; 377 for (rt = rt0, metric = rt0->rt6i_metric;
369 rt && rt->rt6i_metric == metric && (!last || rt != rt0); 378 rt && rt->rt6i_metric == metric && (!last || rt != rt0);
370 rt = rt->u.next) { 379 rt = rt->u.dst.rt6_next) {
371 int m; 380 int m;
372 381
373 if (rt6_check_expired(rt)) 382 if (rt6_check_expired(rt))
@@ -395,9 +404,9 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif,
395 /* no entries matched; do round-robin */ 404 /* no entries matched; do round-robin */
396 static DEFINE_SPINLOCK(lock); 405 static DEFINE_SPINLOCK(lock);
397 spin_lock(&lock); 406 spin_lock(&lock);
398 *head = rt0->u.next; 407 *head = rt0->u.dst.rt6_next;
399 rt0->u.next = last->u.next; 408 rt0->u.dst.rt6_next = last->u.dst.rt6_next;
400 last->u.next = rt0; 409 last->u.dst.rt6_next = rt0;
401 spin_unlock(&lock); 410 spin_unlock(&lock);
402 } 411 }
403 412
@@ -714,7 +723,7 @@ void ip6_route_input(struct sk_buff *skb)
714 .flowlabel = (* (__be32 *) iph)&IPV6_FLOWINFO_MASK, 723 .flowlabel = (* (__be32 *) iph)&IPV6_FLOWINFO_MASK,
715 }, 724 },
716 }, 725 },
717 .mark = skb->mark, 726 .mark = skb->mark,
718 .proto = iph->nexthdr, 727 .proto = iph->nexthdr,
719 }; 728 };
720 729
@@ -879,9 +888,9 @@ static inline unsigned int ipv6_advmss(unsigned int mtu)
879 mtu = ip6_rt_min_advmss; 888 mtu = ip6_rt_min_advmss;
880 889
881 /* 890 /*
882 * Maximal non-jumbo IPv6 payload is IPV6_MAXPLEN and 891 * Maximal non-jumbo IPv6 payload is IPV6_MAXPLEN and
883 * corresponding MSS is IPV6_MAXPLEN - tcp_header_size. 892 * corresponding MSS is IPV6_MAXPLEN - tcp_header_size.
884 * IPV6_MAXPLEN is also valid and means: "any MSS, 893 * IPV6_MAXPLEN is also valid and means: "any MSS,
885 * rely only on pmtu discovery" 894 * rely only on pmtu discovery"
886 */ 895 */
887 if (mtu > IPV6_MAXPLEN - sizeof(struct tcphdr)) 896 if (mtu > IPV6_MAXPLEN - sizeof(struct tcphdr))
@@ -892,7 +901,7 @@ static inline unsigned int ipv6_advmss(unsigned int mtu)
892static struct dst_entry *ndisc_dst_gc_list; 901static struct dst_entry *ndisc_dst_gc_list;
893static DEFINE_SPINLOCK(ndisc_lock); 902static DEFINE_SPINLOCK(ndisc_lock);
894 903
895struct dst_entry *ndisc_dst_alloc(struct net_device *dev, 904struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
896 struct neighbour *neigh, 905 struct neighbour *neigh,
897 struct in6_addr *addr, 906 struct in6_addr *addr,
898 int (*output)(struct sk_buff *)) 907 int (*output)(struct sk_buff *))
@@ -925,8 +934,8 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
925 rt->u.dst.output = output; 934 rt->u.dst.output = output;
926 935
927#if 0 /* there's no chance to use these for ndisc */ 936#if 0 /* there's no chance to use these for ndisc */
928 rt->u.dst.flags = ipv6_addr_type(addr) & IPV6_ADDR_UNICAST 937 rt->u.dst.flags = ipv6_addr_type(addr) & IPV6_ADDR_UNICAST
929 ? DST_HOST 938 ? DST_HOST
930 : 0; 939 : 0;
931 ipv6_addr_copy(&rt->rt6i_dst.addr, addr); 940 ipv6_addr_copy(&rt->rt6i_dst.addr, addr);
932 rt->rt6i_dst.plen = 128; 941 rt->rt6i_dst.plen = 128;
@@ -949,7 +958,7 @@ int ndisc_dst_gc(int *more)
949 int freed; 958 int freed;
950 959
951 next = NULL; 960 next = NULL;
952 freed = 0; 961 freed = 0;
953 962
954 spin_lock_bh(&ndisc_lock); 963 spin_lock_bh(&ndisc_lock);
955 pprev = &ndisc_dst_gc_list; 964 pprev = &ndisc_dst_gc_list;
@@ -1267,9 +1276,9 @@ static int ip6_route_del(struct fib6_config *cfg)
1267 fn = fib6_locate(&table->tb6_root, 1276 fn = fib6_locate(&table->tb6_root,
1268 &cfg->fc_dst, cfg->fc_dst_len, 1277 &cfg->fc_dst, cfg->fc_dst_len,
1269 &cfg->fc_src, cfg->fc_src_len); 1278 &cfg->fc_src, cfg->fc_src_len);
1270 1279
1271 if (fn) { 1280 if (fn) {
1272 for (rt = fn->leaf; rt; rt = rt->u.next) { 1281 for (rt = fn->leaf; rt; rt = rt->u.dst.rt6_next) {
1273 if (cfg->fc_ifindex && 1282 if (cfg->fc_ifindex &&
1274 (rt->rt6i_dev == NULL || 1283 (rt->rt6i_dev == NULL ||
1275 rt->rt6i_dev->ifindex != cfg->fc_ifindex)) 1284 rt->rt6i_dev->ifindex != cfg->fc_ifindex))
@@ -1320,7 +1329,7 @@ static struct rt6_info *__ip6_route_redirect(struct fib6_table *table,
1320 read_lock_bh(&table->tb6_lock); 1329 read_lock_bh(&table->tb6_lock);
1321 fn = fib6_lookup(&table->tb6_root, &fl->fl6_dst, &fl->fl6_src); 1330 fn = fib6_lookup(&table->tb6_root, &fl->fl6_dst, &fl->fl6_src);
1322restart: 1331restart:
1323 for (rt = fn->leaf; rt; rt = rt->u.next) { 1332 for (rt = fn->leaf; rt; rt = rt->u.dst.rt6_next) {
1324 /* 1333 /*
1325 * Current route is on-link; redirect is always invalid. 1334 * Current route is on-link; redirect is always invalid.
1326 * 1335 *
@@ -1396,7 +1405,7 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *src,
1396 * We have finally decided to accept it. 1405 * We have finally decided to accept it.
1397 */ 1406 */
1398 1407
1399 neigh_update(neigh, lladdr, NUD_STALE, 1408 neigh_update(neigh, lladdr, NUD_STALE,
1400 NEIGH_UPDATE_F_WEAK_OVERRIDE| 1409 NEIGH_UPDATE_F_WEAK_OVERRIDE|
1401 NEIGH_UPDATE_F_OVERRIDE| 1410 NEIGH_UPDATE_F_OVERRIDE|
1402 (on_link ? 0 : (NEIGH_UPDATE_F_OVERRIDE_ISROUTER| 1411 (on_link ? 0 : (NEIGH_UPDATE_F_OVERRIDE_ISROUTER|
@@ -1445,7 +1454,7 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *src,
1445 } 1454 }
1446 1455
1447out: 1456out:
1448 dst_release(&rt->u.dst); 1457 dst_release(&rt->u.dst);
1449 return; 1458 return;
1450} 1459}
1451 1460
@@ -1469,7 +1478,7 @@ void rt6_pmtu_discovery(struct in6_addr *daddr, struct in6_addr *saddr,
1469 1478
1470 if (pmtu < IPV6_MIN_MTU) { 1479 if (pmtu < IPV6_MIN_MTU) {
1471 /* 1480 /*
1472 * According to RFC2460, PMTU is set to the IPv6 Minimum Link 1481 * According to RFC2460, PMTU is set to the IPv6 Minimum Link
1473 * MTU (1280) and a fragment header should always be included 1482 * MTU (1280) and a fragment header should always be included
1474 * after a node receiving Too Big message reporting PMTU is 1483 * after a node receiving Too Big message reporting PMTU is
1475 * less than the IPv6 Minimum Link MTU. 1484 * less than the IPv6 Minimum Link MTU.
@@ -1581,7 +1590,7 @@ static struct rt6_info *rt6_get_route_info(struct in6_addr *prefix, int prefixle
1581 if (!fn) 1590 if (!fn)
1582 goto out; 1591 goto out;
1583 1592
1584 for (rt = fn->leaf; rt; rt = rt->u.next) { 1593 for (rt = fn->leaf; rt; rt = rt->u.dst.rt6_next) {
1585 if (rt->rt6i_dev->ifindex != ifindex) 1594 if (rt->rt6i_dev->ifindex != ifindex)
1586 continue; 1595 continue;
1587 if ((rt->rt6i_flags & (RTF_ROUTEINFO|RTF_GATEWAY)) != (RTF_ROUTEINFO|RTF_GATEWAY)) 1596 if ((rt->rt6i_flags & (RTF_ROUTEINFO|RTF_GATEWAY)) != (RTF_ROUTEINFO|RTF_GATEWAY))
@@ -1623,7 +1632,7 @@ static struct rt6_info *rt6_add_route_info(struct in6_addr *prefix, int prefixle
1623#endif 1632#endif
1624 1633
1625struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct net_device *dev) 1634struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct net_device *dev)
1626{ 1635{
1627 struct rt6_info *rt; 1636 struct rt6_info *rt;
1628 struct fib6_table *table; 1637 struct fib6_table *table;
1629 1638
@@ -1632,7 +1641,7 @@ struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct net_device *d
1632 return NULL; 1641 return NULL;
1633 1642
1634 write_lock_bh(&table->tb6_lock); 1643 write_lock_bh(&table->tb6_lock);
1635 for (rt = table->tb6_root.leaf; rt; rt=rt->u.next) { 1644 for (rt = table->tb6_root.leaf; rt; rt=rt->u.dst.rt6_next) {
1636 if (dev == rt->rt6i_dev && 1645 if (dev == rt->rt6i_dev &&
1637 ((rt->rt6i_flags & (RTF_ADDRCONF | RTF_DEFAULT)) == (RTF_ADDRCONF | RTF_DEFAULT)) && 1646 ((rt->rt6i_flags & (RTF_ADDRCONF | RTF_DEFAULT)) == (RTF_ADDRCONF | RTF_DEFAULT)) &&
1638 ipv6_addr_equal(&rt->rt6i_gateway, addr)) 1647 ipv6_addr_equal(&rt->rt6i_gateway, addr))
@@ -1675,7 +1684,7 @@ void rt6_purge_dflt_routers(void)
1675 1684
1676restart: 1685restart:
1677 read_lock_bh(&table->tb6_lock); 1686 read_lock_bh(&table->tb6_lock);
1678 for (rt = table->tb6_root.leaf; rt; rt = rt->u.next) { 1687 for (rt = table->tb6_root.leaf; rt; rt = rt->u.dst.rt6_next) {
1679 if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) { 1688 if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) {
1680 dst_hold(&rt->u.dst); 1689 dst_hold(&rt->u.dst);
1681 read_unlock_bh(&table->tb6_lock); 1690 read_unlock_bh(&table->tb6_lock);
@@ -1887,8 +1896,8 @@ static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg)
1887 */ 1896 */
1888 if (rt->rt6i_dev == arg->dev && 1897 if (rt->rt6i_dev == arg->dev &&
1889 !dst_metric_locked(&rt->u.dst, RTAX_MTU) && 1898 !dst_metric_locked(&rt->u.dst, RTAX_MTU) &&
1890 (dst_mtu(&rt->u.dst) > arg->mtu || 1899 (dst_mtu(&rt->u.dst) > arg->mtu ||
1891 (dst_mtu(&rt->u.dst) < arg->mtu && 1900 (dst_mtu(&rt->u.dst) < arg->mtu &&
1892 dst_mtu(&rt->u.dst) == idev->cnf.mtu6))) 1901 dst_mtu(&rt->u.dst) == idev->cnf.mtu6)))
1893 rt->u.dst.metrics[RTAX_MTU-1] = arg->mtu; 1902 rt->u.dst.metrics[RTAX_MTU-1] = arg->mtu;
1894 rt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(arg->mtu); 1903 rt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(arg->mtu);
@@ -2040,7 +2049,7 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
2040 2049
2041 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*rtm), flags); 2050 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*rtm), flags);
2042 if (nlh == NULL) 2051 if (nlh == NULL)
2043 return -ENOBUFS; 2052 return -EMSGSIZE;
2044 2053
2045 rtm = nlmsg_data(nlh); 2054 rtm = nlmsg_data(nlh);
2046 rtm->rtm_family = AF_INET6; 2055 rtm->rtm_family = AF_INET6;
@@ -2074,13 +2083,13 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
2074 2083
2075 if (dst) { 2084 if (dst) {
2076 NLA_PUT(skb, RTA_DST, 16, dst); 2085 NLA_PUT(skb, RTA_DST, 16, dst);
2077 rtm->rtm_dst_len = 128; 2086 rtm->rtm_dst_len = 128;
2078 } else if (rtm->rtm_dst_len) 2087 } else if (rtm->rtm_dst_len)
2079 NLA_PUT(skb, RTA_DST, 16, &rt->rt6i_dst.addr); 2088 NLA_PUT(skb, RTA_DST, 16, &rt->rt6i_dst.addr);
2080#ifdef CONFIG_IPV6_SUBTREES 2089#ifdef CONFIG_IPV6_SUBTREES
2081 if (src) { 2090 if (src) {
2082 NLA_PUT(skb, RTA_SRC, 16, src); 2091 NLA_PUT(skb, RTA_SRC, 16, src);
2083 rtm->rtm_src_len = 128; 2092 rtm->rtm_src_len = 128;
2084 } else if (rtm->rtm_src_len) 2093 } else if (rtm->rtm_src_len)
2085 NLA_PUT(skb, RTA_SRC, 16, &rt->rt6i_src.addr); 2094 NLA_PUT(skb, RTA_SRC, 16, &rt->rt6i_src.addr);
2086#endif 2095#endif
@@ -2111,7 +2120,8 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
2111 return nlmsg_end(skb, nlh); 2120 return nlmsg_end(skb, nlh);
2112 2121
2113nla_put_failure: 2122nla_put_failure:
2114 return nlmsg_cancel(skb, nlh); 2123 nlmsg_cancel(skb, nlh);
2124 return -EMSGSIZE;
2115} 2125}
2116 2126
2117int rt6_dump_route(struct rt6_info *rt, void *p_arg) 2127int rt6_dump_route(struct rt6_info *rt, void *p_arg)
@@ -2222,9 +2232,12 @@ void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info)
2222 goto errout; 2232 goto errout;
2223 2233
2224 err = rt6_fill_node(skb, rt, NULL, NULL, 0, event, pid, seq, 0, 0); 2234 err = rt6_fill_node(skb, rt, NULL, NULL, 0, event, pid, seq, 0, 0);
2225 /* failure implies BUG in rt6_nlmsg_size() */ 2235 if (err < 0) {
2226 BUG_ON(err < 0); 2236 /* -EMSGSIZE implies BUG in rt6_nlmsg_size() */
2227 2237 WARN_ON(err == -EMSGSIZE);
2238 kfree_skb(skb);
2239 goto errout;
2240 }
2228 err = rtnl_notify(skb, pid, RTNLGRP_IPV6_ROUTE, nlh, gfp_any()); 2241 err = rtnl_notify(skb, pid, RTNLGRP_IPV6_ROUTE, nlh, gfp_any());
2229errout: 2242errout:
2230 if (err < 0) 2243 if (err < 0)
@@ -2286,7 +2299,7 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg)
2286 arg->len += sprintf(arg->buffer + arg->len, 2299 arg->len += sprintf(arg->buffer + arg->len,
2287 " %08x %08x %08x %08x %8s\n", 2300 " %08x %08x %08x %08x %8s\n",
2288 rt->rt6i_metric, atomic_read(&rt->u.dst.__refcnt), 2301 rt->rt6i_metric, atomic_read(&rt->u.dst.__refcnt),
2289 rt->u.dst.__use, rt->rt6i_flags, 2302 rt->u.dst.__use, rt->rt6i_flags,
2290 rt->rt6i_dev ? rt->rt6i_dev->name : ""); 2303 rt->rt6i_dev ? rt->rt6i_dev->name : "");
2291 return 0; 2304 return 0;
2292} 2305}
@@ -2332,7 +2345,7 @@ static int rt6_stats_seq_open(struct inode *inode, struct file *file)
2332 return single_open(file, rt6_stats_seq_show, NULL); 2345 return single_open(file, rt6_stats_seq_show, NULL);
2333} 2346}
2334 2347
2335static struct file_operations rt6_stats_seq_fops = { 2348static const struct file_operations rt6_stats_seq_fops = {
2336 .owner = THIS_MODULE, 2349 .owner = THIS_MODULE,
2337 .open = rt6_stats_seq_open, 2350 .open = rt6_stats_seq_open,
2338 .read = seq_read, 2351 .read = seq_read,
@@ -2358,91 +2371,91 @@ int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp,
2358} 2371}
2359 2372
2360ctl_table ipv6_route_table[] = { 2373ctl_table ipv6_route_table[] = {
2361 { 2374 {
2362 .ctl_name = NET_IPV6_ROUTE_FLUSH, 2375 .ctl_name = NET_IPV6_ROUTE_FLUSH,
2363 .procname = "flush", 2376 .procname = "flush",
2364 .data = &flush_delay, 2377 .data = &flush_delay,
2365 .maxlen = sizeof(int), 2378 .maxlen = sizeof(int),
2366 .mode = 0200, 2379 .mode = 0200,
2367 .proc_handler = &ipv6_sysctl_rtcache_flush 2380 .proc_handler = &ipv6_sysctl_rtcache_flush
2368 }, 2381 },
2369 { 2382 {
2370 .ctl_name = NET_IPV6_ROUTE_GC_THRESH, 2383 .ctl_name = NET_IPV6_ROUTE_GC_THRESH,
2371 .procname = "gc_thresh", 2384 .procname = "gc_thresh",
2372 .data = &ip6_dst_ops.gc_thresh, 2385 .data = &ip6_dst_ops.gc_thresh,
2373 .maxlen = sizeof(int), 2386 .maxlen = sizeof(int),
2374 .mode = 0644, 2387 .mode = 0644,
2375 .proc_handler = &proc_dointvec, 2388 .proc_handler = &proc_dointvec,
2376 }, 2389 },
2377 { 2390 {
2378 .ctl_name = NET_IPV6_ROUTE_MAX_SIZE, 2391 .ctl_name = NET_IPV6_ROUTE_MAX_SIZE,
2379 .procname = "max_size", 2392 .procname = "max_size",
2380 .data = &ip6_rt_max_size, 2393 .data = &ip6_rt_max_size,
2381 .maxlen = sizeof(int), 2394 .maxlen = sizeof(int),
2382 .mode = 0644, 2395 .mode = 0644,
2383 .proc_handler = &proc_dointvec, 2396 .proc_handler = &proc_dointvec,
2384 }, 2397 },
2385 { 2398 {
2386 .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL, 2399 .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL,
2387 .procname = "gc_min_interval", 2400 .procname = "gc_min_interval",
2388 .data = &ip6_rt_gc_min_interval, 2401 .data = &ip6_rt_gc_min_interval,
2389 .maxlen = sizeof(int), 2402 .maxlen = sizeof(int),
2390 .mode = 0644, 2403 .mode = 0644,
2391 .proc_handler = &proc_dointvec_jiffies, 2404 .proc_handler = &proc_dointvec_jiffies,
2392 .strategy = &sysctl_jiffies, 2405 .strategy = &sysctl_jiffies,
2393 }, 2406 },
2394 { 2407 {
2395 .ctl_name = NET_IPV6_ROUTE_GC_TIMEOUT, 2408 .ctl_name = NET_IPV6_ROUTE_GC_TIMEOUT,
2396 .procname = "gc_timeout", 2409 .procname = "gc_timeout",
2397 .data = &ip6_rt_gc_timeout, 2410 .data = &ip6_rt_gc_timeout,
2398 .maxlen = sizeof(int), 2411 .maxlen = sizeof(int),
2399 .mode = 0644, 2412 .mode = 0644,
2400 .proc_handler = &proc_dointvec_jiffies, 2413 .proc_handler = &proc_dointvec_jiffies,
2401 .strategy = &sysctl_jiffies, 2414 .strategy = &sysctl_jiffies,
2402 }, 2415 },
2403 { 2416 {
2404 .ctl_name = NET_IPV6_ROUTE_GC_INTERVAL, 2417 .ctl_name = NET_IPV6_ROUTE_GC_INTERVAL,
2405 .procname = "gc_interval", 2418 .procname = "gc_interval",
2406 .data = &ip6_rt_gc_interval, 2419 .data = &ip6_rt_gc_interval,
2407 .maxlen = sizeof(int), 2420 .maxlen = sizeof(int),
2408 .mode = 0644, 2421 .mode = 0644,
2409 .proc_handler = &proc_dointvec_jiffies, 2422 .proc_handler = &proc_dointvec_jiffies,
2410 .strategy = &sysctl_jiffies, 2423 .strategy = &sysctl_jiffies,
2411 }, 2424 },
2412 { 2425 {
2413 .ctl_name = NET_IPV6_ROUTE_GC_ELASTICITY, 2426 .ctl_name = NET_IPV6_ROUTE_GC_ELASTICITY,
2414 .procname = "gc_elasticity", 2427 .procname = "gc_elasticity",
2415 .data = &ip6_rt_gc_elasticity, 2428 .data = &ip6_rt_gc_elasticity,
2416 .maxlen = sizeof(int), 2429 .maxlen = sizeof(int),
2417 .mode = 0644, 2430 .mode = 0644,
2418 .proc_handler = &proc_dointvec_jiffies, 2431 .proc_handler = &proc_dointvec_jiffies,
2419 .strategy = &sysctl_jiffies, 2432 .strategy = &sysctl_jiffies,
2420 }, 2433 },
2421 { 2434 {
2422 .ctl_name = NET_IPV6_ROUTE_MTU_EXPIRES, 2435 .ctl_name = NET_IPV6_ROUTE_MTU_EXPIRES,
2423 .procname = "mtu_expires", 2436 .procname = "mtu_expires",
2424 .data = &ip6_rt_mtu_expires, 2437 .data = &ip6_rt_mtu_expires,
2425 .maxlen = sizeof(int), 2438 .maxlen = sizeof(int),
2426 .mode = 0644, 2439 .mode = 0644,
2427 .proc_handler = &proc_dointvec_jiffies, 2440 .proc_handler = &proc_dointvec_jiffies,
2428 .strategy = &sysctl_jiffies, 2441 .strategy = &sysctl_jiffies,
2429 }, 2442 },
2430 { 2443 {
2431 .ctl_name = NET_IPV6_ROUTE_MIN_ADVMSS, 2444 .ctl_name = NET_IPV6_ROUTE_MIN_ADVMSS,
2432 .procname = "min_adv_mss", 2445 .procname = "min_adv_mss",
2433 .data = &ip6_rt_min_advmss, 2446 .data = &ip6_rt_min_advmss,
2434 .maxlen = sizeof(int), 2447 .maxlen = sizeof(int),
2435 .mode = 0644, 2448 .mode = 0644,
2436 .proc_handler = &proc_dointvec_jiffies, 2449 .proc_handler = &proc_dointvec_jiffies,
2437 .strategy = &sysctl_jiffies, 2450 .strategy = &sysctl_jiffies,
2438 }, 2451 },
2439 { 2452 {
2440 .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS, 2453 .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS,
2441 .procname = "gc_min_interval_ms", 2454 .procname = "gc_min_interval_ms",
2442 .data = &ip6_rt_gc_min_interval, 2455 .data = &ip6_rt_gc_min_interval,
2443 .maxlen = sizeof(int), 2456 .maxlen = sizeof(int),
2444 .mode = 0644, 2457 .mode = 0644,
2445 .proc_handler = &proc_dointvec_ms_jiffies, 2458 .proc_handler = &proc_dointvec_ms_jiffies,
2446 .strategy = &sysctl_ms_jiffies, 2459 .strategy = &sysctl_ms_jiffies,
2447 }, 2460 },
2448 { .ctl_name = 0 } 2461 { .ctl_name = 0 }