aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 6625699f497c..3219560f9fae 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -82,7 +82,6 @@
82#include <linux/syslog.h> 82#include <linux/syslog.h>
83#include <linux/user_namespace.h> 83#include <linux/user_namespace.h>
84#include <linux/export.h> 84#include <linux/export.h>
85#include <linux/security.h>
86#include <linux/msg.h> 85#include <linux/msg.h>
87#include <linux/shm.h> 86#include <linux/shm.h>
88 87
@@ -4474,14 +4473,10 @@ static int selinux_inet_conn_request(struct sock *sk, struct sk_buff *skb,
4474{ 4473{
4475 struct sk_security_struct *sksec = sk->sk_security; 4474 struct sk_security_struct *sksec = sk->sk_security;
4476 int err; 4475 int err;
4477 u16 family = sk->sk_family; 4476 u16 family = req->rsk_ops->family;
4478 u32 connsid; 4477 u32 connsid;
4479 u32 peersid; 4478 u32 peersid;
4480 4479
4481 /* handle mapped IPv4 packets arriving via IPv6 sockets */
4482 if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP))
4483 family = PF_INET;
4484
4485 err = selinux_skb_peerlbl_sid(skb, family, &peersid); 4480 err = selinux_skb_peerlbl_sid(skb, family, &peersid);
4486 if (err) 4481 if (err)
4487 return err; 4482 return err;