selinux: Correctly handle IPv4 packets on IPv6 sockets in all cases
authorPaul Moore <paul.moore@hp.com>
Fri, 10 Oct 2008 14:16:29 +0000 (10:16 -0400)
committerPaul Moore <paul.moore@hp.com>
Fri, 10 Oct 2008 14:16:29 +0000 (10:16 -0400)
commitaa86290089a1e57b4bdbbb4720072233f66bd5b2
tree9ab16f4d22056297f1571bb7b2b988bff84c8a10
parentaccc609322ef5ed44cba6d2d70c741afc76385fb
selinux: Correctly handle IPv4 packets on IPv6 sockets in all cases

We did the right thing in a few cases but there were several areas where we
determined a packet's address family based on the socket's address family which
is not the right thing to do since we can get IPv4 packets on IPv6 sockets.
This patch fixes these problems by either taking the address family directly
from the packet.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: James Morris <jmorris@namei.org>
security/selinux/hooks.c