summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorCristian Rodríguez <crrodriguez@opensuse.org>2015-02-10 12:06:24 -0300
committerLennart Poettering <lennart@poettering.net>2015-02-10 21:20:16 +0100
commitd6d810fbf8071f8510450dbacd1d083f37603656 (patch)
tree46b41b077868b01b939f37912663108a2193a694 /src/libsystemd-network
parent332560792c6ef0b5c3d9719801b64d0d5f374639 (diff)
tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c2
-rw-r--r--src/libsystemd-network/sd-dhcp-server.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 5f90617b9e..2f76e24ce3 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -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, 0);
+ len = recvmsg(fd, &msg, MSG_CMSG_CLOEXEC);
if (len < 0) {
log_dhcp_client(client, "could not receive message from raw "
"socket: %m");
diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c
index 3f89f344d7..1cb782fca3 100644
--- a/src/libsystemd-network/sd-dhcp-server.c
+++ b/src/libsystemd-network/sd-dhcp-server.c
@@ -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, 0);
+ len = recvmsg(fd, &msg, MSG_CMSG_CLOEXEC);
if (len < buflen)
return 0;
else if ((size_t)len < sizeof(DHCPMessage))