aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_trie.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-11 19:54:08 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 18:08:47 -0500
commit22bd5b9b13f2931ac80949f8bfbc40e8cab05be7 (patch)
treed30639ce43efe3186461b0fff962f80eb2417c61 /net/ipv4/fib_trie.c
parent59b1a94c9a034e63a5e030a5154be1d4d84677d9 (diff)
ipv4: Pass ipv4 flow objects into fib_lookup() paths.
To start doing these conversions, we need to add some temporary flow4_* macros which will eventually go away when all the protocol code paths are changed to work on AF specific flowi objects. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r--net/ipv4/fib_trie.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index d5ff80ef001a..3d28a35c2e1a 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1341,7 +1341,7 @@ err:
1341 1341
1342/* should be called with rcu_read_lock */ 1342/* should be called with rcu_read_lock */
1343static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l, 1343static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l,
1344 t_key key, const struct flowi *flp, 1344 t_key key, const struct flowi4 *flp,
1345 struct fib_result *res, int fib_flags) 1345 struct fib_result *res, int fib_flags)
1346{ 1346{
1347 struct leaf_info *li; 1347 struct leaf_info *li;
@@ -1360,9 +1360,9 @@ static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l,
1360 struct fib_info *fi = fa->fa_info; 1360 struct fib_info *fi = fa->fa_info;
1361 int nhsel, err; 1361 int nhsel, err;
1362 1362
1363 if (fa->fa_tos && fa->fa_tos != flp->fl4_tos) 1363 if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos)
1364 continue; 1364 continue;
1365 if (fa->fa_scope < flp->fl4_scope) 1365 if (fa->fa_scope < flp->flowi4_scope)
1366 continue; 1366 continue;
1367 fib_alias_accessed(fa); 1367 fib_alias_accessed(fa);
1368 err = fib_props[fa->fa_type].error; 1368 err = fib_props[fa->fa_type].error;
@@ -1379,7 +1379,7 @@ static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l,
1379 1379
1380 if (nh->nh_flags & RTNH_F_DEAD) 1380 if (nh->nh_flags & RTNH_F_DEAD)
1381 continue; 1381 continue;
1382 if (flp->flowi_oif && flp->flowi_oif != nh->nh_oif) 1382 if (flp->flowi4_oif && flp->flowi4_oif != nh->nh_oif)
1383 continue; 1383 continue;
1384 1384
1385#ifdef CONFIG_IP_FIB_TRIE_STATS 1385#ifdef CONFIG_IP_FIB_TRIE_STATS
@@ -1406,7 +1406,7 @@ static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l,
1406 return 1; 1406 return 1;
1407} 1407}
1408 1408
1409int fib_table_lookup(struct fib_table *tb, const struct flowi *flp, 1409int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp,
1410 struct fib_result *res, int fib_flags) 1410 struct fib_result *res, int fib_flags)
1411{ 1411{
1412 struct trie *t = (struct trie *) tb->tb_data; 1412 struct trie *t = (struct trie *) tb->tb_data;
@@ -1414,7 +1414,7 @@ int fib_table_lookup(struct fib_table *tb, const struct flowi *flp,
1414 struct rt_trie_node *n; 1414 struct rt_trie_node *n;
1415 struct tnode *pn; 1415 struct tnode *pn;
1416 unsigned int pos, bits; 1416 unsigned int pos, bits;
1417 t_key key = ntohl(flp->fl4_dst); 1417 t_key key = ntohl(flp->daddr);
1418 unsigned int chopped_off; 1418 unsigned int chopped_off;
1419 t_key cindex = 0; 1419 t_key cindex = 0;
1420 unsigned int current_prefix_length = KEYLENGTH; 1420 unsigned int current_prefix_length = KEYLENGTH;