tls: Use correct sk->sk_prot for IPV6
authorBoris Pismenny <borisp@mellanox.com>
Tue, 27 Feb 2018 12:18:39 +0000 (14:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 18:41:11 +0000 (19:41 +0100)
commit2a0f5919e1e6a1c0423d895ab75eb15f94a67c69
tree8f53aac9f3fe9539d00594b124a4f4a79b6d2226
parent2b8b2e76222f1241cec381eb0ec599ee33e9cd00
tls: Use correct sk->sk_prot for IPV6

commit c113187d38ff85dc302a1bb55864b203ebb2ba10 upstream.

The tls ulp overrides sk->prot with a new tls specific proto structs.
The tls specific structs were previously based on the ipv4 specific
tcp_prot sturct.
As a result, attaching the tls ulp to an ipv6 tcp socket replaced
some ipv6 callback with the ipv4 equivalents.

This patch adds ipv6 tls proto structs and uses them when
attached to ipv6 sockets.

Fixes: 3c4d7559159b ('tls: kernel TLS support')
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls_main.c