summaryrefslogtreecommitdiff
path: root/src/network/getifaddrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/getifaddrs.c')
-rw-r--r--src/network/getifaddrs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/getifaddrs.c b/src/network/getifaddrs.c
index a4c31782..a14ac1b3 100644
--- a/src/network/getifaddrs.c
+++ b/src/network/getifaddrs.c
@@ -127,7 +127,7 @@ int getifaddrs(struct ifaddrs **ifap)
}
if_freenameindex(ii);
- int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
+ int sock = socket(PF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP);
if(sock == -1) goto err2;
struct ifreq reqs[32]; /* arbitrary chosen boundary */
struct ifconf conf = {.ifc_len = sizeof reqs, .ifc_req = reqs};