diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-11-27 23:40:55 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-11-27 23:40:55 +0100 |
commit | 5fcb478d007d14227e31bbdd74d9c0b4f54908af (patch) | |
tree | 5742bb4df1d03560e01a4c2727f7d6a5df80ee99 /pflocal | |
parent | fa5e833a50c1e18cee29ca7fb660cc423904a024 (diff) |
Fix two-way transmission for socketpair(SOCK_DGRAM)
* pflocal/socket.c (S_socket_connect2): For connection-less sockets, also
connect `user2' to `user1'.
Diffstat (limited to 'pflocal')
-rw-r--r-- | pflocal/socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pflocal/socket.c b/pflocal/socket.c index faa9951d..2684a723 100644 --- a/pflocal/socket.c +++ b/pflocal/socket.c @@ -37,6 +37,8 @@ S_socket_connect2 (struct sock_user *user1, struct sock_user *user2) return EOPNOTSUPP; err = sock_connect (user1->sock, user2->sock); + if (!err && user1->sock->pipe_class->flags & PIPE_CLASS_CONNECTIONLESS) + err = sock_connect (user2->sock, user1->sock); /* Since USER2 isn't in the receiver position in the rpc, we get a send right for it (although we only use the receive right with the same |