Skip to content

Commit

Permalink
[TIPC]: Add error check to detect non-blocking form of connect()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Apr 15, 2008
1 parent 1819b83 commit 4934c69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4934c69

Please sign in to comment.