From: Erik Hugne <eri...@gm...>
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.
Signed-off-by: Erik Hugne <eri...@gm...>
---
Jon/Ying, i have a very limited test setup, i hope you can review
and ensure that the proposed change is safe.
I have tested it (on net-next) that it at least solves the problem
i had.
Once the fix is mainline, i will submit patches to bash for
shell network redirection.
This should be in net, because it's a bug that breaks connectionless
messaging in many ways.
Feel free to forward it there after your review/signoff.
net/tipc/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.14.1
|