diff options
Diffstat (limited to 'net/ipv6/ip6_fib.c')
| -rw-r--r-- | net/ipv6/ip6_fib.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 92a122b7795d..b6a585909d35 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
| @@ -165,7 +165,7 @@ static __inline__ void node_free(struct fib6_node * fn) | |||
| 165 | static __inline__ void rt6_release(struct rt6_info *rt) | 165 | static __inline__ void rt6_release(struct rt6_info *rt) |
| 166 | { | 166 | { |
| 167 | if (atomic_dec_and_test(&rt->rt6i_ref)) | 167 | if (atomic_dec_and_test(&rt->rt6i_ref)) |
| 168 | dst_free(&rt->u.dst); | 168 | dst_free(&rt->dst); |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | static void fib6_link_table(struct net *net, struct fib6_table *tb) | 171 | static void fib6_link_table(struct net *net, struct fib6_table *tb) |
| @@ -278,7 +278,7 @@ static int fib6_dump_node(struct fib6_walker_t *w) | |||
| 278 | int res; | 278 | int res; |
| 279 | struct rt6_info *rt; | 279 | struct rt6_info *rt; |
| 280 | 280 | ||
| 281 | for (rt = w->leaf; rt; rt = rt->u.dst.rt6_next) { | 281 | for (rt = w->leaf; rt; rt = rt->dst.rt6_next) { |
| 282 | res = rt6_dump_route(rt, w->args); | 282 | res = rt6_dump_route(rt, w->args); |
| 283 | if (res < 0) { | 283 | if (res < 0) { |
| 284 | /* Frame is full, suspend walking */ | 284 | /* Frame is full, suspend walking */ |
| @@ -619,7 +619,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, | |||
| 619 | 619 | ||
| 620 | ins = &fn->leaf; | 620 | ins = &fn->leaf; |
| 621 | 621 | ||
| 622 | for (iter = fn->leaf; iter; iter=iter->u.dst.rt6_next) { | 622 | for (iter = fn->leaf; iter; iter=iter->dst.rt6_next) { |
| 623 | /* | 623 | /* |
| 624 | * Search for duplicates | 624 | * Search for duplicates |
| 625 | */ | 625 | */ |
| @@ -647,7 +647,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, | |||
| 647 | if (iter->rt6i_metric > rt->rt6i_metric) | 647 | if (iter->rt6i_metric > rt->rt6i_metric) |
| 648 | break; | 648 | break; |
| 649 | 649 | ||
| 650 | ins = &iter->u.dst.rt6_next; | 650 | ins = &iter->dst.rt6_next; |
| 651 | } | 651 | } |
| 652 | 652 | ||
| 653 | /* Reset round-robin state, if necessary */ | 653 | /* Reset round-robin state, if necessary */ |
| @@ -658,7 +658,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, | |||
| 658 | * insert node | 658 | * insert node |
| 659 | */ | 659 | */ |
| 660 | 660 | ||
| 661 | rt->u.dst.rt6_next = iter; | 661 | rt->dst.rt6_next = iter; |
| 662 | *ins = rt; | 662 | *ins = rt; |
| 663 | rt->rt6i_node = fn; | 663 | rt->rt6i_node = fn; |
| 664 | atomic_inc(&rt->rt6i_ref); | 664 | atomic_inc(&rt->rt6i_ref); |
| @@ -799,7 +799,7 @@ out: | |||
| 799 | atomic_inc(&pn->leaf->rt6i_ref); | 799 | atomic_inc(&pn->leaf->rt6i_ref); |
| 800 | } | 800 | } |
| 801 | #endif | 801 | #endif |
| 802 | dst_free(&rt->u.dst); | 802 | dst_free(&rt->dst); |
| 803 | } | 803 | } |
| 804 | return err; | 804 | return err; |
| 805 | 805 | ||
| @@ -810,7 +810,7 @@ out: | |||
| 810 | st_failure: | 810 | st_failure: |
| 811 | if (fn && !(fn->fn_flags & (RTN_RTINFO|RTN_ROOT))) | 811 | if (fn && !(fn->fn_flags & (RTN_RTINFO|RTN_ROOT))) |
| 812 | fib6_repair_tree(info->nl_net, fn); | 812 | fib6_repair_tree(info->nl_net, fn); |
| 813 | dst_free(&rt->u.dst); | 813 | dst_free(&rt->dst); |
| 814 | return err; | 814 | return err; |
| 815 | #endif | 815 | #endif |
| 816 | } | 816 | } |
| @@ -1108,7 +1108,7 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp, | |||
| 1108 | RT6_TRACE("fib6_del_route\n"); | 1108 | RT6_TRACE("fib6_del_route\n"); |
| 1109 | 1109 | ||
| 1110 | /* Unlink it */ | 1110 | /* Unlink it */ |
| 1111 | *rtp = rt->u.dst.rt6_next; | 1111 | *rtp = rt->dst.rt6_next; |
| 1112 | rt->rt6i_node = NULL; | 1112 | rt->rt6i_node = NULL; |
| 1113 | net->ipv6.rt6_stats->fib_rt_entries--; | 1113 | net->ipv6.rt6_stats->fib_rt_entries--; |
| 1114 | net->ipv6.rt6_stats->fib_discarded_routes++; | 1114 | net->ipv6.rt6_stats->fib_discarded_routes++; |
| @@ -1122,14 +1122,14 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp, | |||
| 1122 | FOR_WALKERS(w) { | 1122 | FOR_WALKERS(w) { |
| 1123 | if (w->state == FWS_C && w->leaf == rt) { | 1123 | if (w->state == FWS_C && w->leaf == rt) { |
| 1124 | RT6_TRACE("walker %p adjusted by delroute\n", w); | 1124 | RT6_TRACE("walker %p adjusted by delroute\n", w); |
| 1125 | w->leaf = rt->u.dst.rt6_next; | 1125 | w->leaf = rt->dst.rt6_next; |
| 1126 | if (w->leaf == NULL) | 1126 | if (w->leaf == NULL) |
| 1127 | w->state = FWS_U; | 1127 | w->state = FWS_U; |
| 1128 | } | 1128 | } |
| 1129 | } | 1129 | } |
| 1130 | read_unlock(&fib6_walker_lock); | 1130 | read_unlock(&fib6_walker_lock); |
| 1131 | 1131 | ||
| 1132 | rt->u.dst.rt6_next = NULL; | 1132 | rt->dst.rt6_next = NULL; |
| 1133 | 1133 | ||
| 1134 | /* If it was last route, expunge its radix tree node */ | 1134 | /* If it was last route, expunge its radix tree node */ |
| 1135 | if (fn->leaf == NULL) { | 1135 | if (fn->leaf == NULL) { |
| @@ -1168,7 +1168,7 @@ int fib6_del(struct rt6_info *rt, struct nl_info *info) | |||
| 1168 | struct rt6_info **rtp; | 1168 | struct rt6_info **rtp; |
| 1169 | 1169 | ||
| 1170 | #if RT6_DEBUG >= 2 | 1170 | #if RT6_DEBUG >= 2 |
| 1171 | if (rt->u.dst.obsolete>0) { | 1171 | if (rt->dst.obsolete>0) { |
| 1172 | WARN_ON(fn != NULL); | 1172 | WARN_ON(fn != NULL); |
| 1173 | return -ENOENT; | 1173 | return -ENOENT; |
| 1174 | } | 1174 | } |
| @@ -1195,7 +1195,7 @@ int fib6_del(struct rt6_info *rt, struct nl_info *info) | |||
| 1195 | * Walk the leaf entries looking for ourself | 1195 | * Walk the leaf entries looking for ourself |
| 1196 | */ | 1196 | */ |
| 1197 | 1197 | ||
| 1198 | for (rtp = &fn->leaf; *rtp; rtp = &(*rtp)->u.dst.rt6_next) { | 1198 | for (rtp = &fn->leaf; *rtp; rtp = &(*rtp)->dst.rt6_next) { |
| 1199 | if (*rtp == rt) { | 1199 | if (*rtp == rt) { |
| 1200 | fib6_del_route(fn, rtp, info); | 1200 | fib6_del_route(fn, rtp, info); |
| 1201 | return 0; | 1201 | return 0; |
| @@ -1334,7 +1334,7 @@ static int fib6_clean_node(struct fib6_walker_t *w) | |||
| 1334 | .nl_net = c->net, | 1334 | .nl_net = c->net, |
| 1335 | }; | 1335 | }; |
| 1336 | 1336 | ||
| 1337 | for (rt = w->leaf; rt; rt = rt->u.dst.rt6_next) { | 1337 | for (rt = w->leaf; rt; rt = rt->dst.rt6_next) { |
| 1338 | res = c->func(rt, c->arg); | 1338 | res = c->func(rt, c->arg); |
| 1339 | if (res < 0) { | 1339 | if (res < 0) { |
| 1340 | w->leaf = rt; | 1340 | w->leaf = rt; |
| @@ -1448,8 +1448,8 @@ static int fib6_age(struct rt6_info *rt, void *arg) | |||
| 1448 | } | 1448 | } |
| 1449 | gc_args.more++; | 1449 | gc_args.more++; |
| 1450 | } else if (rt->rt6i_flags & RTF_CACHE) { | 1450 | } else if (rt->rt6i_flags & RTF_CACHE) { |
| 1451 | if (atomic_read(&rt->u.dst.__refcnt) == 0 && | 1451 | if (atomic_read(&rt->dst.__refcnt) == 0 && |
| 1452 | time_after_eq(now, rt->u.dst.lastuse + gc_args.timeout)) { | 1452 | time_after_eq(now, rt->dst.lastuse + gc_args.timeout)) { |
| 1453 | RT6_TRACE("aging clone %p\n", rt); | 1453 | RT6_TRACE("aging clone %p\n", rt); |
| 1454 | return -1; | 1454 | return -1; |
| 1455 | } else if ((rt->rt6i_flags & RTF_GATEWAY) && | 1455 | } else if ((rt->rt6i_flags & RTF_GATEWAY) && |
