Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98839
b: refs/heads/master
c: 2e65557
h: refs/heads/master
i:
  98837: 82d6252
  98835: 320d7ce
  98831: 742c0f5
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Jul 10, 2008
1 parent d3b5e7d commit 795c255
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 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: 3d8ea1fd7001f39b5cc0ad2ff51696292ea3cfbf
refs/heads/master: 2e655571c618434c24ac2ca989374fdd84470d6d
17 changes: 6 additions & 11 deletions trunk/net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,17 +1359,17 @@ static int check_leaf(struct trie *t, struct leaf *l,
t->stats.semantic_match_miss++;
#endif
if (err <= 0)
return plen;
return err;
}

return -1;
return 1;
}

static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,
struct fib_result *res)
{
struct trie *t = (struct trie *) tb->tb_data;
int plen, ret = 0;
int ret;
struct node *n;
struct tnode *pn;
int pos, bits;
Expand All @@ -1393,10 +1393,7 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,

/* Just a leaf? */
if (IS_LEAF(n)) {
plen = check_leaf(t, (struct leaf *)n, key, flp, res);
if (plen < 0)
goto failed;
ret = 0;
ret = check_leaf(t, (struct leaf *)n, key, flp, res);
goto found;
}

Expand All @@ -1421,11 +1418,9 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,
}

if (IS_LEAF(n)) {
plen = check_leaf(t, (struct leaf *)n, key, flp, res);
if (plen < 0)
ret = check_leaf(t, (struct leaf *)n, key, flp, res);
if (ret > 0)
goto backtrace;

ret = 0;
goto found;
}

Expand Down

0 comments on commit 795c255

Please sign in to comment.