summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@gmail.com>2019-03-04 23:26:10 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-13 14:03:07 -0700
commit71d1e057fe117c23688a8b08bec410265954008a (patch)
treee402e5fae419796777b86b13c935a69ce835c4eb /net
parent1c69361496c97501f205d4ef2bc7b9c8d4c8a699 (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>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index e5f9f43ff15b..75681845679e 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -943,7 +943,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;
}