Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

This commit is contained in:
David S. Miller
2018-11-24 17:01:43 -08:00
197 changed files with 1788 additions and 743 deletions

View File

@@ -3951,32 +3951,16 @@ static int sctp_setsockopt_pr_supported(struct sock *sk,
unsigned int optlen)
{
struct sctp_assoc_value params;
struct sctp_association *asoc;
int retval = -EINVAL;
if (optlen != sizeof(params))
goto out;
return -EINVAL;
if (copy_from_user(&params, optval, optlen)) {
retval = -EFAULT;
goto out;
}
if (copy_from_user(&params, optval, optlen))
return -EFAULT;
asoc = sctp_id2assoc(sk, params.assoc_id);
if (asoc) {
asoc->prsctp_enable = !!params.assoc_value;
} else if (!params.assoc_id) {
struct sctp_sock *sp = sctp_sk(sk);
sctp_sk(sk)->ep->prsctp_enable = !!params.assoc_value;
sp->ep->prsctp_enable = !!params.assoc_value;
} else {
goto out;
}
retval = 0;
out:
return retval;
return 0;
}
static int sctp_setsockopt_default_prinfo(struct sock *sk,