Lwip 2.1.2 added a new assertion to ensure that no unsupported flags are being sent to lwip_sendmsg(). The send operation must be updated to remove this unsupported flags.
* lwip/socket-ops.c: lwip_S_socket_send(): Remove unsupported flags. --- lwip/socket-ops.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lwip/socket-ops.c b/lwip/socket-ops.c index 62b36e08..82a2fe30 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); + /* Remove unsupported flags */ + flags &= MSG_DONTWAIT | MSG_MORE; 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. */ -- 2.17.1