summaryrefslogtreecommitdiff
path: root/tools/iptables-test.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-10-23 14:16:30 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-10-25 13:36:42 +0200
commitbb1b20cbef2fbb82ee272af3b475dc4cff9c08aa (patch)
treeabf97b79102b498edcd3ce06f4a199c6f96088f9 /tools/iptables-test.c
parent3866231ce4dd27533e086490b84b5363d788721d (diff)
downloadconnman-bb1b20cbef2fbb82ee272af3b475dc4cff9c08aa.tar.gz
connman-bb1b20cbef2fbb82ee272af3b475dc4cff9c08aa.tar.bz2
connman-bb1b20cbef2fbb82ee272af3b475dc4cff9c08aa.zip
tools: Add SOCK_CLOEXEC to socket()
Make sure all file descriptor are closed.
Diffstat (limited to 'tools/iptables-test.c')
-rw-r--r--tools/iptables-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/iptables-test.c b/tools/iptables-test.c
index 35c63008..133c4f96 100644
--- a/tools/iptables-test.c
+++ b/tools/iptables-test.c
@@ -1159,7 +1159,7 @@ static struct connman_iptables *connman_iptables_init(const char *table_name)
if (table->info == NULL)
goto err;
- table->ipt_sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
+ table->ipt_sock = socket(AF_INET, SOCK_RAW | SOCK_CLOEXEC, IPPROTO_RAW);
if (table->ipt_sock < 0)
goto err;