netlabel: If PF_INET6, check sk_buff ip header version
authorRichard Haines <richard_c_haines@btinternet.com>
Mon, 13 Nov 2017 20:54:22 +0000 (20:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:40 +0000 (07:52 +0200)
commitce7da8b88f6a5602743337f4f08f4009591c4cc7
tree11f77f9e284de5fa6acccdb96a8de4b9f2c147da
parentb9cd90c15ea726247cec2097e67008e513d1ae03
netlabel: If PF_INET6, check sk_buff ip header version

[ Upstream commit 213d7f94775322ba44e0bbb55ec6946e9de88cea ]

When resolving a fallback label, check the sk_buff version as it
is possible (e.g. SCTP) to have family = PF_INET6 while
receiving ip_hdr(skb)->version = 4.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netlabel/netlabel_unlabeled.c