Skip to content

Commit a3422eb

Browse files
gtrentalanciapcmoore
authored andcommitted
selinux: mark both IPv4 and IPv6 accepted connection sockets as labeled
The current partial labeling was introduced in 389fb80 ("netlabel: Label incoming TCP connections correctly in SELinux") due to the fact that IPv6 labeling was not supported yet at the time. Signed-off-by: Guido Trentalancia <[email protected]> [PM: properly format the referenced commit ID, adjust subject] Signed-off-by: Paul Moore <[email protected]>
1 parent 4ad858b commit a3422eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/selinux/netlabel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family)
359359
{
360360
struct sk_security_struct *sksec = sk->sk_security;
361361

362-
if (family == PF_INET)
362+
if (family == PF_INET || family == PF_INET6)
363363
sksec->nlbl_state = NLBL_LABELED;
364364
else
365365
sksec->nlbl_state = NLBL_UNSET;

0 commit comments

Comments
 (0)