Pārlūkot izejas kodu

tipc: Provide correct error code for unsupported connect() operation

Modify TIPC to return EOPNOTSUPP if an application attempts to perform
 a non-blocking connect() operation, which is not supported by TIPC.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Allan Stephens 15 gadi atpakaļ
vecāks
revīzija
35997e3157
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      net/tipc/socket.c

+ 1 - 1
net/tipc/socket.c

@@ -1380,7 +1380,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
 	/* For now, TIPC does not support the non-blocking form of connect() */
 
 	if (flags & O_NONBLOCK) {
-		res = -EWOULDBLOCK;
+		res = -EOPNOTSUPP;
 		goto exit;
 	}