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/route.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/route.c')
-rw-r--r-- | net/ipv4/route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index c9aa4f9effe2..027b4cc0f4a0 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1707,7 +1707,7 @@ void ip_rt_get_source(u8 *addr, struct rtable *rt) | |||
1707 | }; | 1707 | }; |
1708 | 1708 | ||
1709 | rcu_read_lock(); | 1709 | rcu_read_lock(); |
1710 | if (fib_lookup(dev_net(rt->dst.dev), &fl, &res) == 0) | 1710 | if (fib_lookup(dev_net(rt->dst.dev), &fl.u.ip4, &res) == 0) |
1711 | src = FIB_RES_PREFSRC(res); | 1711 | src = FIB_RES_PREFSRC(res); |
1712 | else | 1712 | else |
1713 | src = inet_select_addr(rt->dst.dev, rt->rt_gateway, | 1713 | src = inet_select_addr(rt->dst.dev, rt->rt_gateway, |
@@ -2125,7 +2125,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
2125 | fl.fl4_src = saddr; | 2125 | fl.fl4_src = saddr; |
2126 | fl.fl4_tos = tos; | 2126 | fl.fl4_tos = tos; |
2127 | fl.fl4_scope = RT_SCOPE_UNIVERSE; | 2127 | fl.fl4_scope = RT_SCOPE_UNIVERSE; |
2128 | err = fib_lookup(net, &fl, &res); | 2128 | err = fib_lookup(net, &fl.u.ip4, &res); |
2129 | if (err != 0) { | 2129 | if (err != 0) { |
2130 | if (!IN_DEV_FORWARD(in_dev)) | 2130 | if (!IN_DEV_FORWARD(in_dev)) |
2131 | goto e_hostunreach; | 2131 | goto e_hostunreach; |
@@ -2551,7 +2551,7 @@ static struct rtable *ip_route_output_slow(struct net *net, | |||
2551 | goto make_route; | 2551 | goto make_route; |
2552 | } | 2552 | } |
2553 | 2553 | ||
2554 | if (fib_lookup(net, &fl, &res)) { | 2554 | if (fib_lookup(net, &fl.u.ip4, &res)) { |
2555 | res.fi = NULL; | 2555 | res.fi = NULL; |
2556 | if (oldflp->flowi_oif) { | 2556 | if (oldflp->flowi_oif) { |
2557 | /* Apparently, routing tables are wrong. Assume, | 2557 | /* Apparently, routing tables are wrong. Assume, |