tcp: do not use ipv6 header for ipv4 flow
authorEric Dumazet <edumazet@google.com>
Tue, 19 Mar 2019 12:45:35 +0000 (05:45 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Aug 2019 11:38:48 +0000 (12:38 +0100)
commit169b154649e29d455b0677ec43fb874d18794802
treeff688a9850c8fa63dc92da1183b5890aee31558f
parent1b75034a1bb506abcabb2c2f9d7360020a7e2c42
tcp: do not use ipv6 header for ipv4 flow

commit 89e4130939a20304f4059ab72179da81f5347528 upstream.

When a dual stack tcp listener accepts an ipv4 flow,
it should not attempt to use an ipv6 header or tcp_v6_iif() helper.

Fixes: 1397ed35f22d ("ipv6: add flowinfo for tcp6 pkt_options for all cases")
Fixes: df3687ffc665 ("ipv6: add the IPV6_FL_F_REFLECT flag to IPV6_FL_A_GET")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/ipv6/tcp_ipv6.c