aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-03 23:25:42 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-03 23:25:42 -0400
commit31e4543db29fb85496a122b965d6482c8d1a2bfe (patch)
tree3e49d61a1202e1b3c8c71e422f3fd8e4f2616d01 /include/net/route.h
parentf1390160ddcd64a3cfd48b3280d0a616a31b9520 (diff)
ipv4: Make caller provide on-stack flow key to ip_route_output_ports().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/route.h')
-rw-r--r--include/net/route.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/net/route.h b/include/net/route.h
index f07609e83141..8c02c871a8ce 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -137,20 +137,19 @@ static inline struct rtable *ip_route_output(struct net *net, __be32 daddr,
137 return ip_route_output_key(net, &fl4); 137 return ip_route_output_key(net, &fl4);
138} 138}
139 139
140static inline struct rtable *ip_route_output_ports(struct net *net, struct sock *sk, 140static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi4 *fl4,
141 struct sock *sk,
141 __be32 daddr, __be32 saddr, 142 __be32 daddr, __be32 saddr,
142 __be16 dport, __be16 sport, 143 __be16 dport, __be16 sport,
143 __u8 proto, __u8 tos, int oif) 144 __u8 proto, __u8 tos, int oif)
144{ 145{
145 struct flowi4 fl4; 146 flowi4_init_output(fl4, oif, sk ? sk->sk_mark : 0, tos,
146
147 flowi4_init_output(&fl4, oif, sk ? sk->sk_mark : 0, tos,
148 RT_SCOPE_UNIVERSE, proto, 147 RT_SCOPE_UNIVERSE, proto,
149 sk ? inet_sk_flowi_flags(sk) : 0, 148 sk ? inet_sk_flowi_flags(sk) : 0,
150 daddr, saddr, dport, sport); 149 daddr, saddr, dport, sport);
151 if (sk) 150 if (sk)
152 security_sk_classify_flow(sk, flowi4_to_flowi(&fl4)); 151 security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
153 return ip_route_output_flow(net, &fl4, sk); 152 return ip_route_output_flow(net, fl4, sk);
154} 153}
155 154
156static inline struct rtable *ip_route_output_gre(struct net *net, 155static inline struct rtable *ip_route_output_gre(struct net *net,