Verified Commit 7a4d4087 authored by Petr Špaček's avatar Petr Špaček

sendmmsg/recvmmsg: abort on unsupported calls

Latest version of libuv uses sendmmsg by default so it bypassed
socket wrapper. We now catch these calls and abort program to avoid
problems like that.

In long term we have to migrate from socket wrapper to something else,
this is a hard-to-maintain mess. Possile option are Linux network
namespaces.
parent 0b7e64ea
......@@ -4955,6 +4955,25 @@ ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags)
return swrap_recvmsg(sockfd, msg, flags);
}
// USE_GNU
int recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
struct timespec *__tmo)
{
printf("ERROR: recvmmsg call not supported in libswrap, aborting\n");
abort();
}
int uv__recvmmsg(int fd,
struct uv__mmsghdr* mmsg,
unsigned int vlen,
unsigned int flags,
struct timespec* timeout)
{
printf("ERROR: uv__recvmmsg call not supported in libswrap, aborting\n");
abort();
}
/****************************************************************************
* SENDMSG
***************************************************************************/
......@@ -5098,6 +5117,24 @@ ssize_t sendmsg(int s, const struct msghdr *omsg, int flags)
return swrap_sendmsg(s, omsg, flags);
}
// USE_GNU
int sendmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags)
{
printf("ERROR: sendmmsg call not supported in libswrap, aborting\n");
abort();
}
int uv__sendmmsg(int fd,
struct uv__mmsghdr* mmsg,
unsigned int vlen,
unsigned int flags) {
printf("ERROR: uv__sendmmsg call not supported in libswrap, aborting\n");
abort();
}
/****************************************************************************
* READV
***************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment