1
0
Fork 0

tipc: fix RDM/DGRAM connect() regression

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

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

Fixes: 365ad353c2 ("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>
hifive-unleashed-5.1
Erik Hugne 2019-03-04 23:26:10 +01:00 committed by David S. Miller
parent d9862cfbe2
commit 0e63208915
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}