aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d09589a51c44..6beaa7821ca6 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -228,11 +228,9 @@ static struct sctp_transport *sctp_addr_id2transport(struct sock *sk,
228 struct sctp_association *addr_asoc = NULL, *id_asoc = NULL; 228 struct sctp_association *addr_asoc = NULL, *id_asoc = NULL;
229 struct sctp_transport *transport; 229 struct sctp_transport *transport;
230 union sctp_addr *laddr = (union sctp_addr *)addr; 230 union sctp_addr *laddr = (union sctp_addr *)addr;
231 union sctp_addr tmp;
232 231
233 flip_to_h(&tmp, laddr);
234 addr_asoc = sctp_endpoint_lookup_assoc(sctp_sk(sk)->ep, 232 addr_asoc = sctp_endpoint_lookup_assoc(sctp_sk(sk)->ep,
235 &tmp, 233 laddr,
236 &transport); 234 &transport);
237 235
238 if (!addr_asoc) 236 if (!addr_asoc)
@@ -1007,7 +1005,7 @@ static int __sctp_connect(struct sock* sk,
1007 /* Check if there already is a matching association on the 1005 /* Check if there already is a matching association on the
1008 * endpoint (other than the one created here). 1006 * endpoint (other than the one created here).
1009 */ 1007 */
1010 asoc2 = sctp_endpoint_lookup_assoc(ep, &to, &transport); 1008 asoc2 = sctp_endpoint_lookup_assoc(ep, sa_addr, &transport);
1011 if (asoc2 && asoc2 != asoc) { 1009 if (asoc2 && asoc2 != asoc) {
1012 if (asoc2->state >= SCTP_STATE_ESTABLISHED) 1010 if (asoc2->state >= SCTP_STATE_ESTABLISHED)
1013 err = -EISCONN; 1011 err = -EISCONN;
@@ -1468,7 +1466,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
1468 /* If a msg_name has been specified, assume this is to be used. */ 1466 /* If a msg_name has been specified, assume this is to be used. */
1469 if (msg_name) { 1467 if (msg_name) {
1470 /* Look for a matching association on the endpoint. */ 1468 /* Look for a matching association on the endpoint. */
1471 asoc = sctp_endpoint_lookup_assoc(ep, &to, &transport); 1469 asoc = sctp_endpoint_lookup_assoc(ep, &tmp, &transport);
1472 if (!asoc) { 1470 if (!asoc) {
1473 /* If we could not find a matching association on the 1471 /* If we could not find a matching association on the
1474 * endpoint, make sure that it is not a TCP-style 1472 * endpoint, make sure that it is not a TCP-style