diff options
author | Erik Hugne <erik.hugne@gmail.com> | 2019-03-04 23:26:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-10 07:10:11 +0100 |
commit | ad80dc7748e78abd218ae342d38ade2fc9c9525c (patch) | |
tree | 472e15e1262276878a8d1be79413bf6b3e81b46f | |
parent | 7f970568faa4ba93890135f6a463abacd1c6fb3a (diff) |
tipc: fix RDM/DGRAM connect() regression
[ Upstream commit 0e63208915a8d7590d0a6218dadb2a6a00ac705a ]
Fix regression bug introduced in
commit 365ad353c256 ("tipc: reduce risk of user starvation during link
congestion")
Only signal -EDESTADDRREQ for RDM/DGRAM if we don't have a cached
sockaddr.
Fixes: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion")
Signed-off-by: Erik Hugne <erik.hugne@gmail.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/tipc/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 8f34db2a9785..615de0910a07 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1320,7 +1320,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen) if (unlikely(!dest)) { dest = &tsk->peer; - if (!syn || dest->family != AF_TIPC) + if (!syn && dest->family != AF_TIPC) return -EDESTADDRREQ; } |