diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-14 23:23:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-14 23:23:54 -0400 |
commit | 2aec609fb45e84d65bc8eabc7b650bbecb1cc179 (patch) | |
tree | eb3e8a79604113392d0ee74b19dbc1dfce579c11 /net/ipv4/fib_trie.c | |
parent | 4c8894980010536915c4f5513ee180e3614aeca9 (diff) | |
parent | 9076689ab07974a6f5d230fc241448f7a77e9078 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/netfilter/nf_conntrack_proto_tcp.c
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index d16ae4623be6..f155a66d6ebf 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -1357,17 +1357,17 @@ static int check_leaf(struct trie *t, struct leaf *l, | |||
1357 | t->stats.semantic_match_miss++; | 1357 | t->stats.semantic_match_miss++; |
1358 | #endif | 1358 | #endif |
1359 | if (err <= 0) | 1359 | if (err <= 0) |
1360 | return plen; | 1360 | return err; |
1361 | } | 1361 | } |
1362 | 1362 | ||
1363 | return -1; | 1363 | return 1; |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | 1366 | static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, |
1367 | struct fib_result *res) | 1367 | struct fib_result *res) |
1368 | { | 1368 | { |
1369 | struct trie *t = (struct trie *) tb->tb_data; | 1369 | struct trie *t = (struct trie *) tb->tb_data; |
1370 | int plen, ret = 0; | 1370 | int ret; |
1371 | struct node *n; | 1371 | struct node *n; |
1372 | struct tnode *pn; | 1372 | struct tnode *pn; |
1373 | int pos, bits; | 1373 | int pos, bits; |
@@ -1391,10 +1391,7 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | |||
1391 | 1391 | ||
1392 | /* Just a leaf? */ | 1392 | /* Just a leaf? */ |
1393 | if (IS_LEAF(n)) { | 1393 | if (IS_LEAF(n)) { |
1394 | plen = check_leaf(t, (struct leaf *)n, key, flp, res); | 1394 | ret = check_leaf(t, (struct leaf *)n, key, flp, res); |
1395 | if (plen < 0) | ||
1396 | goto failed; | ||
1397 | ret = 0; | ||
1398 | goto found; | 1395 | goto found; |
1399 | } | 1396 | } |
1400 | 1397 | ||
@@ -1419,11 +1416,9 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | |||
1419 | } | 1416 | } |
1420 | 1417 | ||
1421 | if (IS_LEAF(n)) { | 1418 | if (IS_LEAF(n)) { |
1422 | plen = check_leaf(t, (struct leaf *)n, key, flp, res); | 1419 | ret = check_leaf(t, (struct leaf *)n, key, flp, res); |
1423 | if (plen < 0) | 1420 | if (ret > 0) |
1424 | goto backtrace; | 1421 | goto backtrace; |
1425 | |||
1426 | ret = 0; | ||
1427 | goto found; | 1422 | goto found; |
1428 | } | 1423 | } |
1429 | 1424 | ||