diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-04-15 00:16:19 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-15 00:16:19 -0700 |
commit | 4934c69a384ede7d0c3009098184554da2063de6 (patch) | |
tree | d06f0505c484ff23f150636f6acf95a928da63fe /net/tipc/socket.c | |
parent | 1819b83718dc3fe0aea0a2c3cd48d617e2003606 (diff) | |
download | linux-4934c69a384ede7d0c3009098184554da2063de6.tar.gz linux-4934c69a384ede7d0c3009098184554da2063de6.tar.bz2 linux-4934c69a384ede7d0c3009098184554da2063de6.zip |
[TIPC]: Add error check to detect non-blocking form of connect()
This patch causes TIPC to return an error indication if the non-
blocking form of connect() is requested (which TIPC does not yet
support).
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r-- | net/tipc/socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 4c83aba575c5..348e4ff881ab 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1260,6 +1260,11 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, if (sock->state == SS_READY) return -EOPNOTSUPP; + /* For now, TIPC does not support the non-blocking form of connect() */ + + if (flags & O_NONBLOCK) + return -EWOULDBLOCK; + /* Issue Posix-compliant error code if socket is in the wrong state */ if (sock->state == SS_LISTENING) |