Skip to content

Commit

Permalink
Smack: Fix kbuild reported build error
Browse files Browse the repository at this point in the history
The variable sap is defined under ifdef, but a recently
added use of the variable was not. Put that use under ifdef
as well.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
  • Loading branch information
cschaufler authored and ramosian-glider committed May 16, 2019
1 parent 1b570f2 commit 6ac8662
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions security/smack/smack_lsm.c
Expand Up @@ -3692,6 +3692,7 @@ static int smack_socket_sendmsg(struct socket *sock, struct msghdr *msg,
return -EINVAL;
rc = smack_netlabel_send(sock->sk, sip);
break;
#if IS_ENABLED(CONFIG_IPV6)
case AF_INET6:
if (msg->msg_namelen < SIN6_LEN_RFC2133 ||
sap->sin6_family != AF_INET6)
Expand All @@ -3705,6 +3706,7 @@ static int smack_socket_sendmsg(struct socket *sock, struct msghdr *msg,
#ifdef SMACK_IPV6_PORT_LABELING
rc = smk_ipv6_port_check(sock->sk, sap, SMK_SENDING);
#endif
#endif /* IS_ENABLED(CONFIG_IPV6) */
break;
}
return rc;
Expand Down

0 comments on commit 6ac8662

Please sign in to comment.