diff options
-rw-r--r-- | security/selinux/hooks.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index f53000803a5d..6e8d0e91c0ca 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3669,7 +3669,7 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in | |||
3669 | struct sockaddr_in6 *addr6 = NULL; | 3669 | struct sockaddr_in6 *addr6 = NULL; |
3670 | unsigned short snum; | 3670 | unsigned short snum; |
3671 | struct sock *sk = sock->sk; | 3671 | struct sock *sk = sock->sk; |
3672 | u32 sid, node_perm, addrlen; | 3672 | u32 sid, node_perm; |
3673 | 3673 | ||
3674 | tsec = current->security; | 3674 | tsec = current->security; |
3675 | isec = SOCK_INODE(sock)->i_security; | 3675 | isec = SOCK_INODE(sock)->i_security; |
@@ -3677,12 +3677,10 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in | |||
3677 | if (family == PF_INET) { | 3677 | if (family == PF_INET) { |
3678 | addr4 = (struct sockaddr_in *)address; | 3678 | addr4 = (struct sockaddr_in *)address; |
3679 | snum = ntohs(addr4->sin_port); | 3679 | snum = ntohs(addr4->sin_port); |
3680 | addrlen = sizeof(addr4->sin_addr.s_addr); | ||
3681 | addrp = (char *)&addr4->sin_addr.s_addr; | 3680 | addrp = (char *)&addr4->sin_addr.s_addr; |
3682 | } else { | 3681 | } else { |
3683 | addr6 = (struct sockaddr_in6 *)address; | 3682 | addr6 = (struct sockaddr_in6 *)address; |
3684 | snum = ntohs(addr6->sin6_port); | 3683 | snum = ntohs(addr6->sin6_port); |
3685 | addrlen = sizeof(addr6->sin6_addr.s6_addr); | ||
3686 | addrp = (char *)&addr6->sin6_addr.s6_addr; | 3684 | addrp = (char *)&addr6->sin6_addr.s6_addr; |
3687 | } | 3685 | } |
3688 | 3686 | ||