diff options
Diffstat (limited to 'net/sctp/socket.c')
| -rw-r--r-- | net/sctp/socket.c | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index b9070736b8d..f631c5ff4db 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -1119,9 +1119,10 @@ static int __sctp_connect(struct sock* sk,  		/* Make sure the destination port is correctly set  		 * in all addresses.  		 */ -		if (asoc && asoc->peer.port && asoc->peer.port != port) +		if (asoc && asoc->peer.port && asoc->peer.port != port) { +			err = -EINVAL;  			goto out_free; - +		}  		/* Check if there already is a matching association on the  		 * endpoint (other than the one created here). @@ -6185,7 +6186,8 @@ unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait)  	/* Is there any exceptional events?  */  	if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) -		mask |= POLLERR; +		mask |= POLLERR | +			sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;  	if (sk->sk_shutdown & RCV_SHUTDOWN)  		mask |= POLLRDHUP | POLLIN | POLLRDNORM;  	if (sk->sk_shutdown == SHUTDOWN_MASK)  |