diff options
author | Joan Lledó <joanlluislledo@gmail.com> | 2019-05-04 10:19:59 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-05-04 10:58:33 +0200 |
commit | 1b7c1ca5392f3b950afa28cb07d6703d5497fd93 (patch) | |
tree | bbcbf3091adefaaa1731eb0b254162e981e2b1c0 /lwip | |
parent | 7a229a28593f35e05ceb622f1051b7dd07a78679 (diff) | |
download | hurd-1b7c1ca5392f3b950afa28cb07d6703d5497fd93.tar.gz hurd-1b7c1ca5392f3b950afa28cb07d6703d5497fd93.tar.bz2 hurd-1b7c1ca5392f3b950afa28cb07d6703d5497fd93.zip |
lwip: Fix bug: Clear MSG_NOSIGNAL flag when calling send().
Lwip 2.1.2 added a new assertion to ensure that no unsupported flags
are being sent to lwip_sendmsg(). MSG_NOSIGNAL is one of these flags
and name resolving stopped working.
* lwip/socket-ops.c: lwip_S_socket_send():
Clear MSG_NOSIGNAL to ensure is not sent to lwip_sendmsg().
Message-Id: <20190504081959.6463-2-jlledom@member.fsf.org>
Diffstat (limited to 'lwip')
-rw-r--r-- | lwip/socket-ops.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lwip/socket-ops.c b/lwip/socket-ops.c index 62b36e08..9030e477 100644 --- a/lwip/socket-ops.c +++ b/lwip/socket-ops.c @@ -347,11 +347,11 @@ lwip_S_socket_send (struct sock_user * user, int sent; int sockflags; struct iovec iov = { data, datalen }; -struct msghdr m = { msg_name:addr ? &addr->address : 0, - msg_namelen:addr ? addr->address.sa.sa_len : 0, - msg_flags:flags, - msg_controllen: 0, msg_iov: &iov, msg_iovlen:1 - }; + struct msghdr m = { msg_name:addr ? &addr->address : 0, + msg_namelen:addr ? addr->address.sa.sa_len : 0, + msg_flags:flags, + msg_controllen: 0, msg_iov: &iov, msg_iovlen:1 + }; if (!user) return EOPNOTSUPP; @@ -361,8 +361,11 @@ struct msghdr m = { msg_name:addr ? &addr->address : 0, return EINVAL; sockflags = lwip_fcntl (user->sock->sockno, F_GETFL, 0); + /* XXX: missing !MSG_NOSIGNAL support, i.e. generate SIGPIPE */ + flags &= ~MSG_NOSIGNAL; if (sockflags & O_NONBLOCK) flags |= MSG_DONTWAIT; + sent = lwip_sendmsg (user->sock->sockno, &m, flags); /* MiG should do this for us, but it doesn't. */ |