tipc: Provide correct error code for unsupported connect() operation
authorAllan Stephens <allan.stephens@windriver.com>
Tue, 17 Aug 2010 11:00:05 +0000 (11:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Aug 2010 00:31:52 +0000 (17:31 -0700)
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>
net/tipc/socket.c

index 69d0fd1..b89c7b1 100644 (file)
@@ -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;
        }