diff options
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 6beaa7821ca6..e118e3c1285e 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1018,7 +1018,7 @@ static int __sctp_connect(struct sock* sk, | |||
1018 | * make sure that there is no peeled-off association matching | 1018 | * make sure that there is no peeled-off association matching |
1019 | * the peer address even on another socket. | 1019 | * the peer address even on another socket. |
1020 | */ | 1020 | */ |
1021 | if (sctp_endpoint_is_peeled_off(ep, &to)) { | 1021 | if (sctp_endpoint_is_peeled_off(ep, sa_addr)) { |
1022 | err = -EADDRNOTAVAIL; | 1022 | err = -EADDRNOTAVAIL; |
1023 | goto out_free; | 1023 | goto out_free; |
1024 | } | 1024 | } |
@@ -1475,7 +1475,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1475 | */ | 1475 | */ |
1476 | if ((sctp_style(sk, TCP) && | 1476 | if ((sctp_style(sk, TCP) && |
1477 | sctp_sstate(sk, ESTABLISHED)) || | 1477 | sctp_sstate(sk, ESTABLISHED)) || |
1478 | sctp_endpoint_is_peeled_off(ep, &to)) { | 1478 | sctp_endpoint_is_peeled_off(ep, &tmp)) { |
1479 | err = -EADDRNOTAVAIL; | 1479 | err = -EADDRNOTAVAIL; |
1480 | goto out_unlock; | 1480 | goto out_unlock; |
1481 | } | 1481 | } |