net: tcp: move sk_rx_dst_set call after tcp_create_openreq_child()
authorNeal Cardwell <ncardwell@google.com>
Sun, 19 Aug 2012 03:30:38 +0000 (03:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Aug 2012 10:03:33 +0000 (03:03 -0700)
commitfae6ef87faeb8853896920c68ee703d715799d28
tree67a31066d1ad0a6f2f997ee64dd4eb78b05b9a19
parent3de7a37b02f607716753dc669c1dca4f71db08fc
net: tcp: move sk_rx_dst_set call after tcp_create_openreq_child()

This commit removes the sk_rx_dst_set calls from
tcp_create_openreq_child(), because at that point the icsk_af_ops
field of ipv6_mapped TCP sockets has not been set to its proper final
value.

Instead, to make sure we get the right sk_rx_dst_set variant
appropriate for the address family of the new connection, we have
tcp_v{4,6}_syn_recv_sock() directly call the appropriate function
shortly after the call to tcp_create_openreq_child() returns.

This also moves inet6_sk_rx_dst_set() to avoid a forward declaration
with the new approach.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Reported-by: Artem Savkov <artem.savkov@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_minisocks.c
net/ipv6/tcp_ipv6.c