summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@gmail.com>2019-03-04 23:26:10 +0100
committerDavid S. Miller <davem@davemloft.net>2019-03-05 21:49:13 +0100
commit0e63208915a8d7590d0a6218dadb2a6a00ac705a (patch)
treebe66e549d57eaf645f112f5a071f092450acd286 /net/tipc
parentMerge tag 'mips_5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux (diff)
downloadlinux-0e63208915a8d7590d0a6218dadb2a6a00ac705a.tar.xz
linux-0e63208915a8d7590d0a6218dadb2a6a00ac705a.zip
tipc: fix RDM/DGRAM connect() regression
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>
Diffstat (limited to 'net/tipc')
-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 e482b342bfa8..3274ef625dba 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1333,7 +1333,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;
}