aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-29 15:59:42 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-29 15:59:42 -0400
commit70d374ea9907036e15574a5ce89219edd5baee10 (patch)
treeb858bb4a841eb91b1d91b41c33698d05fa7bfb37 /net
parentaa7e16d6b88b3b38db0d2ee49ed5e44e7b2045ec (diff)
parentbf4e70e54cf31dcca48d279c7f7e71328eebe749 (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/fib_trie.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index a701405fab0..45efd5f4741 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1333,9 +1333,9 @@ err:;
1333} 1333}
1334 1334
1335static inline int check_leaf(struct trie *t, struct leaf *l, t_key key, int *plen, const struct flowi *flp, 1335static inline int check_leaf(struct trie *t, struct leaf *l, t_key key, int *plen, const struct flowi *flp,
1336 struct fib_result *res, int *err) 1336 struct fib_result *res)
1337{ 1337{
1338 int i; 1338 int err, i;
1339 t_key mask; 1339 t_key mask;
1340 struct leaf_info *li; 1340 struct leaf_info *li;
1341 struct hlist_head *hhead = &l->list; 1341 struct hlist_head *hhead = &l->list;
@@ -1348,18 +1348,18 @@ static inline int check_leaf(struct trie *t, struct leaf *l, t_key key, int *pl
1348 if (l->key != (key & mask)) 1348 if (l->key != (key & mask))
1349 continue; 1349 continue;
1350 1350
1351 if (((*err) = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) == 0) { 1351 if ((err = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) <= 0) {
1352 *plen = i; 1352 *plen = i;
1353#ifdef CONFIG_IP_FIB_TRIE_STATS 1353#ifdef CONFIG_IP_FIB_TRIE_STATS
1354 t->stats.semantic_match_passed++; 1354 t->stats.semantic_match_passed++;
1355#endif 1355#endif
1356 return 1; 1356 return err;
1357 } 1357 }
1358#ifdef CONFIG_IP_FIB_TRIE_STATS 1358#ifdef CONFIG_IP_FIB_TRIE_STATS
1359 t->stats.semantic_match_miss++; 1359 t->stats.semantic_match_miss++;
1360#endif 1360#endif
1361 } 1361 }
1362 return 0; 1362 return 1;
1363} 1363}
1364 1364
1365static int 1365static int
@@ -1386,7 +1386,7 @@ fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result
1386 1386
1387 /* Just a leaf? */ 1387 /* Just a leaf? */
1388 if (IS_LEAF(n)) { 1388 if (IS_LEAF(n)) {
1389 if (check_leaf(t, (struct leaf *)n, key, &plen, flp, res, &ret)) 1389 if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res)) <= 0)
1390 goto found; 1390 goto found;
1391 goto failed; 1391 goto failed;
1392 } 1392 }
@@ -1508,7 +1508,7 @@ fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result
1508 continue; 1508 continue;
1509 } 1509 }
1510 if (IS_LEAF(n)) { 1510 if (IS_LEAF(n)) {
1511 if (check_leaf(t, (struct leaf *)n, key, &plen, flp, res, &ret)) 1511 if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res)) <= 0)
1512 goto found; 1512 goto found;
1513 } 1513 }
1514backtrace: 1514backtrace: