netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/4] tcp: fix inet6_csk_route_req() for link-local addresses
@ 2012-06-28 22:34 Neal Cardwell
  2012-06-28 22:34 ` [PATCH net-next 2/4] tcp: pass fl6 to inet6_csk_route_req() Neal Cardwell
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Neal Cardwell @ 2012-06-28 22:34 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Eric Dumazet, Neal Cardwell

Fix inet6_csk_route_req() to use as the flowi6_oif the treq->iif,
which is correctly fixed up in tcp_v6_conn_request() to handle the
case of link-local addresses. This brings it in line with the
tcp_v6_send_synack() code, which is already correctly using the
treq->iif in this way.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
---
 net/ipv6/inet6_connection_sock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index e6cee52..e23d354 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -68,7 +68,7 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk,
 	fl6.daddr = treq->rmt_addr;
 	final_p = fl6_update_dst(&fl6, np->opt, &final);
 	fl6.saddr = treq->loc_addr;
-	fl6.flowi6_oif = sk->sk_bound_dev_if;
+	fl6.flowi6_oif = treq->iif;
 	fl6.flowi6_mark = sk->sk_mark;
 	fl6.fl6_dport = inet_rsk(req)->rmt_port;
 	fl6.fl6_sport = inet_rsk(req)->loc_port;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-29  0:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-28 22:34 [PATCH net-next 1/4] tcp: fix inet6_csk_route_req() for link-local addresses Neal Cardwell
2012-06-28 22:34 ` [PATCH net-next 2/4] tcp: pass fl6 to inet6_csk_route_req() Neal Cardwell
2012-06-29  0:55   ` David Miller
2012-06-28 22:34 ` [PATCH net-next 3/4] tcp: use inet6_csk_route_req() in tcp_v6_send_synack() Neal Cardwell
2012-06-29  0:55   ` David Miller
2012-06-28 22:34 ` [PATCH net-next 4/4] tcp: plug dst leak in tcp_v6_conn_request() Neal Cardwell
2012-06-29  0:55   ` David Miller
2012-06-29  0:55 ` [PATCH net-next 1/4] tcp: fix inet6_csk_route_req() for link-local addresses David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).