aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.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/ip6_fib.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/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index f90ab5233326..8c9024890bbe 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -298,7 +298,7 @@ static int fib6_dump_node(struct fib6_walker_t *w)
298 int res; 298 int res;
299 struct rt6_info *rt; 299 struct rt6_info *rt;
300 300
301 for (rt = w->leaf; rt; rt = rt->u.next) { 301 for (rt = w->leaf; rt; rt = rt->u.dst.rt6_next) {
302 res = rt6_dump_route(rt, w->args); 302 res = rt6_dump_route(rt, w->args);
303 if (res < 0) { 303 if (res < 0) {
304 /* Frame is full, suspend walking */ 304 /* Frame is full, suspend walking */
@@ -624,11 +624,11 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
624 fn->leaf == &ip6_null_entry && 624 fn->leaf == &ip6_null_entry &&
625 !(rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) ){ 625 !(rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) ){
626 fn->leaf = rt; 626 fn->leaf = rt;
627 rt->u.next = NULL; 627 rt->u.dst.rt6_next = NULL;
628 goto out; 628 goto out;
629 } 629 }
630 630
631 for (iter = fn->leaf; iter; iter=iter->u.next) { 631 for (iter = fn->leaf; iter; iter=iter->u.dst.rt6_next) {
632 /* 632 /*
633 * Search for duplicates 633 * Search for duplicates
634 */ 634 */
@@ -656,7 +656,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
656 if (iter->rt6i_metric > rt->rt6i_metric) 656 if (iter->rt6i_metric > rt->rt6i_metric)
657 break; 657 break;
658 658
659 ins = &iter->u.next; 659 ins = &iter->u.dst.rt6_next;
660 } 660 }
661 661
662 /* 662 /*
@@ -664,7 +664,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
664 */ 664 */
665 665
666out: 666out:
667 rt->u.next = iter; 667 rt->u.dst.rt6_next = iter;
668 *ins = rt; 668 *ins = rt;
669 rt->rt6i_node = fn; 669 rt->rt6i_node = fn;
670 atomic_inc(&rt->rt6i_ref); 670 atomic_inc(&rt->rt6i_ref);
@@ -1105,7 +1105,7 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,
1105 RT6_TRACE("fib6_del_route\n"); 1105 RT6_TRACE("fib6_del_route\n");
1106 1106
1107 /* Unlink it */ 1107 /* Unlink it */
1108 *rtp = rt->u.next; 1108 *rtp = rt->u.dst.rt6_next;
1109 rt->rt6i_node = NULL; 1109 rt->rt6i_node = NULL;
1110 rt6_stats.fib_rt_entries--; 1110 rt6_stats.fib_rt_entries--;
1111 rt6_stats.fib_discarded_routes++; 1111 rt6_stats.fib_discarded_routes++;
@@ -1115,14 +1115,14 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,
1115 FOR_WALKERS(w) { 1115 FOR_WALKERS(w) {
1116 if (w->state == FWS_C && w->leaf == rt) { 1116 if (w->state == FWS_C && w->leaf == rt) {
1117 RT6_TRACE("walker %p adjusted by delroute\n", w); 1117 RT6_TRACE("walker %p adjusted by delroute\n", w);
1118 w->leaf = rt->u.next; 1118 w->leaf = rt->u.dst.rt6_next;
1119 if (w->leaf == NULL) 1119 if (w->leaf == NULL)
1120 w->state = FWS_U; 1120 w->state = FWS_U;
1121 } 1121 }
1122 } 1122 }
1123 read_unlock(&fib6_walker_lock); 1123 read_unlock(&fib6_walker_lock);
1124 1124
1125 rt->u.next = NULL; 1125 rt->u.dst.rt6_next = NULL;
1126 1126
1127 if (fn->leaf == NULL && fn->fn_flags&RTN_TL_ROOT) 1127 if (fn->leaf == NULL && fn->fn_flags&RTN_TL_ROOT)
1128 fn->leaf = &ip6_null_entry; 1128 fn->leaf = &ip6_null_entry;
@@ -1190,7 +1190,7 @@ int fib6_del(struct rt6_info *rt, struct nl_info *info)
1190 * Walk the leaf entries looking for ourself 1190 * Walk the leaf entries looking for ourself
1191 */ 1191 */
1192 1192
1193 for (rtp = &fn->leaf; *rtp; rtp = &(*rtp)->u.next) { 1193 for (rtp = &fn->leaf; *rtp; rtp = &(*rtp)->u.dst.rt6_next) {
1194 if (*rtp == rt) { 1194 if (*rtp == rt) {
1195 fib6_del_route(fn, rtp, info); 1195 fib6_del_route(fn, rtp, info);
1196 return 0; 1196 return 0;
@@ -1317,7 +1317,7 @@ static int fib6_clean_node(struct fib6_walker_t *w)
1317 struct rt6_info *rt; 1317 struct rt6_info *rt;
1318 struct fib6_cleaner_t *c = (struct fib6_cleaner_t*)w; 1318 struct fib6_cleaner_t *c = (struct fib6_cleaner_t*)w;
1319 1319
1320 for (rt = w->leaf; rt; rt = rt->u.next) { 1320 for (rt = w->leaf; rt; rt = rt->u.dst.rt6_next) {
1321 res = c->func(rt, c->arg); 1321 res = c->func(rt, c->arg);
1322 if (res < 0) { 1322 if (res < 0) {
1323 w->leaf = rt; 1323 w->leaf = rt;