Commit 8d1b9800 authored by Erik Hugne's avatar Erik Hugne Committed by Greg Kroah-Hartman

tipc: fix RDM/DGRAM connect() regression

[ Upstream commit 0e632089 ]

Fix regression bug introduced in
commit 365ad353 ("tipc: reduce risk of user starvation during link
congestion")

Only signal -EDESTADDRREQ for RDM/DGRAM if we don't have a cached
sockaddr.

Fixes: 365ad353 ("tipc: reduce risk of user starvation during link congestion")
Signed-off-by: default avatarErik Hugne <erik.hugne@gmail.com>
Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 089100d5
...@@ -1318,7 +1318,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen) ...@@ -1318,7 +1318,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen)
if (unlikely(!dest)) { if (unlikely(!dest)) {
dest = &tsk->peer; dest = &tsk->peer;
if (!syn || dest->family != AF_TIPC) if (!syn && dest->family != AF_TIPC)
return -EDESTADDRREQ; return -EDESTADDRREQ;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment