diff options
Diffstat (limited to 'client/NetdClient.cpp')
-rw-r--r-- | client/NetdClient.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/NetdClient.cpp b/client/NetdClient.cpp index 0c9d1859..3157d3a9 100644 --- a/client/NetdClient.cpp +++ b/client/NetdClient.cpp @@ -118,9 +118,9 @@ int setNetworkForTarget(unsigned netId, std::atomic_uint* target) { // might itself cause another check with the fwmark server, which would be wasteful. int socketFd; if (libcSocket) { - socketFd = libcSocket(AF_INET6, SOCK_DGRAM, 0); + socketFd = libcSocket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0); } else { - socketFd = socket(AF_INET6, SOCK_DGRAM, 0); + socketFd = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0); } if (socketFd < 0) { return -errno; |