[ Upstream commit 129a99890936766f4b69b9da7ed88366313a9210 ]
A socket which has sk_family set to PF_INET6 is able to receive not
only IPv6 but also IPv4 traffic (IPv4-mapped IPv6 addresses).
Prior to this patch, the smk_skb_to_addr_ipv6() could have been
called for socket buffers containing IPv4 packets, in result such
traffic was allowed.
Signed-off-by: Piotr Sawicki <firstname.lastname@example.org>
Signed-off-by: Casey Schaufler <email@example.com>
Signed-off-by: Sasha Levin <firstname.lastname@example.org>
Signed-off-by: Greg Kroah-Hartman <email@example.com>