diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-11 19:54:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:47 -0500 |
commit | 22bd5b9b13f2931ac80949f8bfbc40e8cab05be7 (patch) | |
tree | d30639ce43efe3186461b0fff962f80eb2417c61 /net/ipv4/fib_frontend.c | |
parent | 59b1a94c9a034e63a5e030a5154be1d4d84677d9 (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_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 76105284a81c..48125d559f17 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -158,7 +158,7 @@ static inline unsigned __inet_dev_addr_type(struct net *net, | |||
158 | if (local_table) { | 158 | if (local_table) { |
159 | ret = RTN_UNICAST; | 159 | ret = RTN_UNICAST; |
160 | rcu_read_lock(); | 160 | rcu_read_lock(); |
161 | if (!fib_table_lookup(local_table, &fl, &res, FIB_LOOKUP_NOREF)) { | 161 | if (!fib_table_lookup(local_table, &fl.u.ip4, &res, FIB_LOOKUP_NOREF)) { |
162 | if (!dev || dev == res.fi->fib_dev) | 162 | if (!dev || dev == res.fi->fib_dev) |
163 | ret = res.type; | 163 | ret = res.type; |
164 | } | 164 | } |
@@ -222,7 +222,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, | |||
222 | goto e_inval; | 222 | goto e_inval; |
223 | 223 | ||
224 | net = dev_net(dev); | 224 | net = dev_net(dev); |
225 | if (fib_lookup(net, &fl, &res)) | 225 | if (fib_lookup(net, &fl.u.ip4, &res)) |
226 | goto last_resort; | 226 | goto last_resort; |
227 | if (res.type != RTN_UNICAST) { | 227 | if (res.type != RTN_UNICAST) { |
228 | if (res.type != RTN_LOCAL || !accept_local) | 228 | if (res.type != RTN_LOCAL || !accept_local) |
@@ -256,7 +256,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, | |||
256 | fl.flowi_oif = dev->ifindex; | 256 | fl.flowi_oif = dev->ifindex; |
257 | 257 | ||
258 | ret = 0; | 258 | ret = 0; |
259 | if (fib_lookup(net, &fl, &res) == 0) { | 259 | if (fib_lookup(net, &fl.u.ip4, &res) == 0) { |
260 | if (res.type == RTN_UNICAST) { | 260 | if (res.type == RTN_UNICAST) { |
261 | *spec_dst = FIB_RES_PREFSRC(res); | 261 | *spec_dst = FIB_RES_PREFSRC(res); |
262 | ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST; | 262 | ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST; |
@@ -813,7 +813,7 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb) | |||
813 | 813 | ||
814 | frn->tb_id = tb->tb_id; | 814 | frn->tb_id = tb->tb_id; |
815 | rcu_read_lock(); | 815 | rcu_read_lock(); |
816 | frn->err = fib_table_lookup(tb, &fl, &res, FIB_LOOKUP_NOREF); | 816 | frn->err = fib_table_lookup(tb, &fl.u.ip4, &res, FIB_LOOKUP_NOREF); |
817 | 817 | ||
818 | if (!frn->err) { | 818 | if (!frn->err) { |
819 | frn->prefixlen = res.prefixlen; | 819 | frn->prefixlen = res.prefixlen; |