Commit 0e632089 authored by Erik Hugne's avatar Erik Hugne Committed by David S. Miller
Browse files

tipc: fix RDM/DGRAM connect() regression



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>
parent d9862cfb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}