diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c7c6619431d5..53cb6da5f1c6 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -4365,7 +4365,8 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in | |||
4365 | 4365 | ||
4366 | inet_get_local_port_range(sock_net(sk), &low, &high); | 4366 | inet_get_local_port_range(sock_net(sk), &low, &high); |
4367 | 4367 | ||
4368 | if (snum < max(PROT_SOCK, low) || snum > high) { | 4368 | if (snum < max(inet_prot_sock(sock_net(sk)), low) || |
4369 | snum > high) { | ||
4369 | err = sel_netport_sid(sk->sk_protocol, | 4370 | err = sel_netport_sid(sk->sk_protocol, |
4370 | snum, &sid); | 4371 | snum, &sid); |
4371 | if (err) | 4372 | if (err) |