diff options
author | David S. Miller <davem@davemloft.net> | 2010-12-17 15:27:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-17 15:27:22 -0500 |
commit | b4aa9e05a61b845541fa6f5b1d246976922601f0 (patch) | |
tree | ca94478c3df281ab76a3399f5ba6341ade3f5791 /net/sctp/socket.c | |
parent | 1dc0f3c54ce1df957f99c17b145488fd03eb1a59 (diff) | |
parent | 4b8fe66300acb2fba8b16d62606e0d30204022fc (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bnx2x/bnx2x.h
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/vhost/vhost.c
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 842c7f3650b9..a09b0dd25f50 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -2932,6 +2932,7 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva | |||
2932 | struct sctp_association *asoc = NULL; | 2932 | struct sctp_association *asoc = NULL; |
2933 | struct sctp_setpeerprim prim; | 2933 | struct sctp_setpeerprim prim; |
2934 | struct sctp_chunk *chunk; | 2934 | struct sctp_chunk *chunk; |
2935 | struct sctp_af *af; | ||
2935 | int err; | 2936 | int err; |
2936 | 2937 | ||
2937 | sp = sctp_sk(sk); | 2938 | sp = sctp_sk(sk); |
@@ -2959,6 +2960,13 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva | |||
2959 | if (!sctp_state(asoc, ESTABLISHED)) | 2960 | if (!sctp_state(asoc, ESTABLISHED)) |
2960 | return -ENOTCONN; | 2961 | return -ENOTCONN; |
2961 | 2962 | ||
2963 | af = sctp_get_af_specific(prim.sspp_addr.ss_family); | ||
2964 | if (!af) | ||
2965 | return -EINVAL; | ||
2966 | |||
2967 | if (!af->addr_valid((union sctp_addr *)&prim.sspp_addr, sp, NULL)) | ||
2968 | return -EADDRNOTAVAIL; | ||
2969 | |||
2962 | if (!sctp_assoc_lookup_laddr(asoc, (union sctp_addr *)&prim.sspp_addr)) | 2970 | if (!sctp_assoc_lookup_laddr(asoc, (union sctp_addr *)&prim.sspp_addr)) |
2963 | return -EADDRNOTAVAIL; | 2971 | return -EADDRNOTAVAIL; |
2964 | 2972 | ||
@@ -5045,7 +5053,7 @@ static int sctp_getsockopt_partial_delivery_point(struct sock *sk, int len, | |||
5045 | if (copy_to_user(optval, &val, len)) | 5053 | if (copy_to_user(optval, &val, len)) |
5046 | return -EFAULT; | 5054 | return -EFAULT; |
5047 | 5055 | ||
5048 | return -ENOTSUPP; | 5056 | return 0; |
5049 | } | 5057 | } |
5050 | 5058 | ||
5051 | /* | 5059 | /* |