Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34547
b: refs/heads/master
c: 825e288
h: refs/heads/master
i:
  34545: a4e9525
  34543: f1d7859
v: v3
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Sep 22, 2006
1 parent f657cdf commit 7a27806
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 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: 3fc5e0440be7fab3abae4e801b0ef17e9b3b58c4
refs/heads/master: 825e288ef4c55a379a97e104c825eb9b74874099
23 changes: 16 additions & 7 deletions trunk/net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,9 @@ static struct fib6_node * fib6_lookup_1(struct fib6_node *root,
struct fib6_node *fn;
int dir;

if (unlikely(args->offset == 0))
return NULL;

/*
* Descend on a tree
*/
Expand Down Expand Up @@ -879,16 +882,22 @@ static struct fib6_node * fib6_lookup_1(struct fib6_node *root,
struct fib6_node * fib6_lookup(struct fib6_node *root, struct in6_addr *daddr,
struct in6_addr *saddr)
{
struct lookup_args args[2];
struct fib6_node *fn;

args[0].offset = offsetof(struct rt6_info, rt6i_dst);
args[0].addr = daddr;

struct lookup_args args[] = {
{
.offset = offsetof(struct rt6_info, rt6i_dst),
.addr = daddr,
},
#ifdef CONFIG_IPV6_SUBTREES
args[1].offset = offsetof(struct rt6_info, rt6i_src);
args[1].addr = saddr;
{
.offset = offsetof(struct rt6_info, rt6i_src),
.addr = saddr,
},
#endif
{
.offset = 0, /* sentinel */
}
};

fn = fib6_lookup_1(root, args);

Expand Down

0 comments on commit 7a27806

Please sign in to comment.