aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 00:00:52 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 15:08:42 -0800
commit78fbfd8a653ca972afe479517a40661bfff6d8c3 (patch)
tree9dccc5c16bf269d53d8499064ec95a998e84c646 /net/netfilter
parent1561747ddf9d28185548687b11aae7074d6129c4 (diff)
downloadkernel_samsung_tuna-78fbfd8a653ca972afe479517a40661bfff6d8c3.zip
kernel_samsung_tuna-78fbfd8a653ca972afe479517a40661bfff6d8c3.tar.gz
kernel_samsung_tuna-78fbfd8a653ca972afe479517a40661bfff6d8c3.tar.bz2
ipv4: Create and use route lookup helpers.
The idea here is this minimizes the number of places one has to edit in order to make changes to how flows are defined and used. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/ipvs/ip_vs_xmit.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index 878f6dd..faf381d 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -98,12 +98,7 @@ __ip_vs_get_out_rt(struct sk_buff *skb, struct ip_vs_dest *dest,
spin_lock(&dest->dst_lock);
if (!(rt = (struct rtable *)
__ip_vs_dst_check(dest, rtos))) {
- struct flowi fl = {
- .fl4_dst = dest->addr.ip,
- .fl4_tos = rtos,
- };
-
- rt = ip_route_output_key(net, &fl);
+ rt = ip_route_output(net, dest->addr.ip, 0, rtos, 0);
if (IS_ERR(rt)) {
spin_unlock(&dest->dst_lock);
IP_VS_DBG_RL("ip_route_output error, dest: %pI4\n",
@@ -117,12 +112,7 @@ __ip_vs_get_out_rt(struct sk_buff *skb, struct ip_vs_dest *dest,
}
spin_unlock(&dest->dst_lock);
} else {
- struct flowi fl = {
- .fl4_dst = daddr,
- .fl4_tos = rtos,
- };
-
- rt = ip_route_output_key(net, &fl);
+ rt = ip_route_output(net, daddr, 0, rtos, 0);
if (IS_ERR(rt)) {
IP_VS_DBG_RL("ip_route_output error, dest: %pI4\n",
&daddr);