Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"
This reverts commit d6d810fbf8.
It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw
sockets.
This commit is contained in:
@@ -1582,7 +1582,7 @@ static int client_receive_message_raw(sd_event_source *s, int fd,
|
||||
iov.iov_base = packet;
|
||||
iov.iov_len = buflen;
|
||||
|
||||
len = recvmsg(fd, &msg, MSG_CMSG_CLOEXEC);
|
||||
len = recvmsg(fd, &msg, 0);
|
||||
if (len < 0) {
|
||||
log_dhcp_client(client, "could not receive message from raw "
|
||||
"socket: %m");
|
||||
|
||||
@@ -897,7 +897,7 @@ static int server_receive_message(sd_event_source *s, int fd,
|
||||
iov.iov_base = message;
|
||||
iov.iov_len = buflen;
|
||||
|
||||
len = recvmsg(fd, &msg, MSG_CMSG_CLOEXEC);
|
||||
len = recvmsg(fd, &msg, 0);
|
||||
if (len < buflen)
|
||||
return 0;
|
||||
else if ((size_t)len < sizeof(DHCPMessage))
|
||||
|
||||
Reference in New Issue
Block a user