提交 4934c69a 编写于 作者: A Allan Stephens 提交者: David S. Miller

[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: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1819b837
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册