Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34546
b: refs/heads/master
c: 3fc5e04
h: refs/heads/master
v: v3
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Sep 22, 2006
1 parent a4e9525 commit f657cdf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2285adc1e6c9f964f9625e7edcd233fccd7a7c92
refs/heads/master: 3fc5e0440be7fab3abae4e801b0ef17e9b3b58c4
39 changes: 15 additions & 24 deletions trunk/net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,33 +850,26 @@ static struct fib6_node * fib6_lookup_1(struct fib6_node *root,
break;
}

while ((fn->fn_flags & RTN_ROOT) == 0) {
#ifdef CONFIG_IPV6_SUBTREES
if (fn->subtree) {
struct fib6_node *st;
struct lookup_args *narg;

narg = args + 1;

if (narg->addr) {
st = fib6_lookup_1(fn->subtree, narg);

if (st && !(st->fn_flags & RTN_ROOT))
return st;
}
}
#endif

if (fn->fn_flags & RTN_RTINFO) {
while(fn) {
if (SUBTREE(fn) || fn->fn_flags & RTN_RTINFO) {
struct rt6key *key;

key = (struct rt6key *) ((u8 *) fn->leaf +
args->offset);

if (ipv6_prefix_equal(&key->addr, args->addr, key->plen))
return fn;
if (ipv6_prefix_equal(&key->addr, args->addr, key->plen)) {
#ifdef CONFIG_IPV6_SUBTREES
if (fn->subtree)
fn = fib6_lookup_1(fn->subtree, args + 1);
#endif
if (!fn || fn->fn_flags & RTN_RTINFO)
return fn;
}
}

if (fn->fn_flags & RTN_ROOT)
break;

fn = fn->parent;
}

Expand Down Expand Up @@ -953,10 +946,8 @@ struct fib6_node * fib6_locate(struct fib6_node *root,
#ifdef CONFIG_IPV6_SUBTREES
if (src_len) {
BUG_TRAP(saddr!=NULL);
if (fn == NULL)
fn = fn->subtree;
if (fn)
fn = fib6_locate_1(fn, saddr, src_len,
if (fn && fn->subtree)
fn = fib6_locate_1(fn->subtree, saddr, src_len,
offsetof(struct rt6_info, rt6i_src));
}
#endif
Expand Down

0 comments on commit f657cdf

Please sign in to comment.