aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-02-09 19:22:57 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:20:40 -0500
commit7cc482634f1f1e1db5401007658c8e8d6cf1617d (patch)
treec79f22adc08cd76c2c211a0120fe19d726b8c225 /net/ipv6/route.c
parent093c2ca4167cf66f69020329d14138da0da8599b (diff)
[IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer
This patch removes the next pointer from 'struct rt6_info.u' union, and renames u.next to u.dst.rt6_next. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index fc8448cc5d21..a415ac610e2d 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -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;
@@ -376,7 +376,7 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif,
376 376
377 for (rt = rt0, metric = rt0->rt6i_metric; 377 for (rt = rt0, metric = rt0->rt6i_metric;
378 rt && rt->rt6i_metric == metric && (!last || rt != rt0); 378 rt && rt->rt6i_metric == metric && (!last || rt != rt0);
379 rt = rt->u.next) { 379 rt = rt->u.dst.rt6_next) {
380 int m; 380 int m;
381 381
382 if (rt6_check_expired(rt)) 382 if (rt6_check_expired(rt))
@@ -404,9 +404,9 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif,
404 /* no entries matched; do round-robin */ 404 /* no entries matched; do round-robin */
405 static DEFINE_SPINLOCK(lock); 405 static DEFINE_SPINLOCK(lock);
406 spin_lock(&lock); 406 spin_lock(&lock);
407 *head = rt0->u.next; 407 *head = rt0->u.dst.rt6_next;
408 rt0->u.next = last->u.next; 408 rt0->u.dst.rt6_next = last->u.dst.rt6_next;
409 last->u.next = rt0; 409 last->u.dst.rt6_next = rt0;
410 spin_unlock(&lock); 410 spin_unlock(&lock);
411 } 411 }
412 412
@@ -1278,7 +1278,7 @@ static int ip6_route_del(struct fib6_config *cfg)
1278 &cfg->fc_src, cfg->fc_src_len); 1278 &cfg->fc_src, cfg->fc_src_len);
1279 1279
1280 if (fn) { 1280 if (fn) {
1281 for (rt = fn->leaf; rt; rt = rt->u.next) { 1281 for (rt = fn->leaf; rt; rt = rt->u.dst.rt6_next) {
1282 if (cfg->fc_ifindex && 1282 if (cfg->fc_ifindex &&
1283 (rt->rt6i_dev == NULL || 1283 (rt->rt6i_dev == NULL ||
1284 rt->rt6i_dev->ifindex != cfg->fc_ifindex)) 1284 rt->rt6i_dev->ifindex != cfg->fc_ifindex))
@@ -1329,7 +1329,7 @@ static struct rt6_info *__ip6_route_redirect(struct fib6_table *table,
1329 read_lock_bh(&table->tb6_lock); 1329 read_lock_bh(&table->tb6_lock);
1330 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);
1331restart: 1331restart:
1332 for (rt = fn->leaf; rt; rt = rt->u.next) { 1332 for (rt = fn->leaf; rt; rt = rt->u.dst.rt6_next) {
1333 /* 1333 /*
1334 * Current route is on-link; redirect is always invalid. 1334 * Current route is on-link; redirect is always invalid.
1335 * 1335 *
@@ -1590,7 +1590,7 @@ static struct rt6_info *rt6_get_route_info(struct in6_addr *prefix, int prefixle
1590 if (!fn) 1590 if (!fn)
1591 goto out; 1591 goto out;
1592 1592
1593 for (rt = fn->leaf; rt; rt = rt->u.next) { 1593 for (rt = fn->leaf; rt; rt = rt->u.dst.rt6_next) {
1594 if (rt->rt6i_dev->ifindex != ifindex) 1594 if (rt->rt6i_dev->ifindex != ifindex)
1595 continue; 1595 continue;
1596 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))
@@ -1641,7 +1641,7 @@ struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct net_device *d
1641 return NULL; 1641 return NULL;
1642 1642
1643 write_lock_bh(&table->tb6_lock); 1643 write_lock_bh(&table->tb6_lock);
1644 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) {
1645 if (dev == rt->rt6i_dev && 1645 if (dev == rt->rt6i_dev &&
1646 ((rt->rt6i_flags & (RTF_ADDRCONF | RTF_DEFAULT)) == (RTF_ADDRCONF | RTF_DEFAULT)) && 1646 ((rt->rt6i_flags & (RTF_ADDRCONF | RTF_DEFAULT)) == (RTF_ADDRCONF | RTF_DEFAULT)) &&
1647 ipv6_addr_equal(&rt->rt6i_gateway, addr)) 1647 ipv6_addr_equal(&rt->rt6i_gateway, addr))
@@ -1684,7 +1684,7 @@ void rt6_purge_dflt_routers(void)
1684 1684
1685restart: 1685restart:
1686 read_lock_bh(&table->tb6_lock); 1686 read_lock_bh(&table->tb6_lock);
1687 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) {
1688 if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) { 1688 if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) {
1689 dst_hold(&rt->u.dst); 1689 dst_hold(&rt->u.dst);
1690 read_unlock_bh(&table->tb6_lock); 1690 read_unlock_bh(&table->tb6_lock);