Commit 619ae03e authored by Casey Schaufler's avatar Casey Schaufler

Smack: Fix kbuild reported build error

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: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
parent b9ef5513
......@@ -3693,6 +3693,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)
......@@ -3706,6 +3707,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment