summaryrefslogtreecommitdiff
path: root/src/dnsproxy.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-10-23 14:16:29 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-10-25 13:36:28 +0200
commit3866231ce4dd27533e086490b84b5363d788721d (patch)
treeea8ae35ba4df1ec23e408d3a9fc9e10ebc690433 /src/dnsproxy.c
parent244b3b17aa713d6daf70709e105c0e0a1faff78e (diff)
downloadconnman-3866231ce4dd27533e086490b84b5363d788721d.tar.gz
connman-3866231ce4dd27533e086490b84b5363d788721d.tar.bz2
connman-3866231ce4dd27533e086490b84b5363d788721d.zip
core: Add SOCK_CLOEXEC to socket()
Make sure all file descriptor are closed.
Diffstat (limited to 'src/dnsproxy.c')
-rw-r--r--src/dnsproxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index c889a651..960207fb 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -1349,12 +1349,12 @@ static int create_dns_listener(int protocol, struct listener_data *ifdata)
switch (protocol) {
case IPPROTO_UDP:
proto = "UDP";
- type = SOCK_DGRAM;
+ type = SOCK_DGRAM | SOCK_CLOEXEC;
break;
case IPPROTO_TCP:
proto = "TCP";
- type = SOCK_STREAM;
+ type = SOCK_STREAM | SOCK_CLOEXEC;
break;
default: