Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4934c69a authored by Allan Stephens's avatar Allan Stephens Committed by David S. Miller
Browse files

[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: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1819b837
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)