summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorErik Hugne2019-03-04 23:26:10 +0100
committerGreg Kroah-Hartman2019-03-10 07:17:17 +0100
commit8d1b9800c1ea9f3c27a2a724e0024a30784b39a9 (patch)
treefc5512c90f01ec44a744f1a02dc69d05d2274f93 /net/tipc
parentteam: Free BPF filter when unregistering netdev (diff)
downloadkernel-qcow2-linux-8d1b9800c1ea9f3c27a2a724e0024a30784b39a9.tar.gz
kernel-qcow2-linux-8d1b9800c1ea9f3c27a2a724e0024a30784b39a9.tar.xz
kernel-qcow2-linux-8d1b9800c1ea9f3c27a2a724e0024a30784b39a9.zip
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/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 e1bdaf056c8f..c5614d8e74fa 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1318,7 +1318,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;
}