mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
selinux: handle ICMPv6 consistently with ICMP
commit 79c8b348f215 ("selinux: support distinctions among all network
address families") mapped datagram ICMP sockets to the new icmp_socket
security class, but left ICMPv6 sockets unchanged. This change fixes
that oversight to handle both kinds of sockets consistently.
Signed-off-by: Stephen Smalley <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
This commit is contained in:
parent
a2c7c6fbe5
commit
ef37979a2c
1 changed files with 2 additions and 1 deletions
|
|
@ -1295,7 +1295,8 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
|
|||
case SOCK_DGRAM:
|
||||
if (default_protocol_dgram(protocol))
|
||||
return SECCLASS_UDP_SOCKET;
|
||||
else if (extsockclass && protocol == IPPROTO_ICMP)
|
||||
else if (extsockclass && (protocol == IPPROTO_ICMP ||
|
||||
protocol == IPPROTO_ICMPV6))
|
||||
return SECCLASS_ICMP_SOCKET;
|
||||
else
|
||||
return SECCLASS_RAWIP_SOCKET;
|
||||
|
|
|
|||
Loading…
Reference in a new issue