aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
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 /net/ipv4/af_inet.c
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 'net/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 4e734992e266..7b91fa8bf83c 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1152,6 +1152,7 @@ int inet_sk_rebuild_header(struct sock *sk)
1152 struct rtable *rt = (struct rtable *)__sk_dst_check(sk, 0); 1152 struct rtable *rt = (struct rtable *)__sk_dst_check(sk, 0);
1153 __be32 daddr; 1153 __be32 daddr;
1154 struct ip_options_rcu *inet_opt; 1154 struct ip_options_rcu *inet_opt;
1155 struct flowi4 fl4;
1155 int err; 1156 int err;
1156 1157
1157 /* Route is OK, nothing to do. */ 1158 /* Route is OK, nothing to do. */
@@ -1165,7 +1166,7 @@ int inet_sk_rebuild_header(struct sock *sk)
1165 if (inet_opt && inet_opt->opt.srr) 1166 if (inet_opt && inet_opt->opt.srr)
1166 daddr = inet_opt->opt.faddr; 1167 daddr = inet_opt->opt.faddr;
1167 rcu_read_unlock(); 1168 rcu_read_unlock();
1168 rt = ip_route_output_ports(sock_net(sk), sk, daddr, inet->inet_saddr, 1169 rt = ip_route_output_ports(sock_net(sk), &fl4, sk, daddr, inet->inet_saddr,
1169 inet->inet_dport, inet->inet_sport, 1170 inet->inet_dport, inet->inet_sport,
1170 sk->sk_protocol, RT_CONN_FLAGS(sk), 1171 sk->sk_protocol, RT_CONN_FLAGS(sk),
1171 sk->sk_bound_dev_if); 1172 sk->sk_bound_dev_if);