diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-10-23 14:16:29 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-10-25 13:36:28 +0200 |
commit | 3866231ce4dd27533e086490b84b5363d788721d (patch) | |
tree | ea8ae35ba4df1ec23e408d3a9fc9e10ebc690433 /src/iptables.c | |
parent | 244b3b17aa713d6daf70709e105c0e0a1faff78e (diff) | |
download | connman-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/iptables.c')
-rw-r--r-- | src/iptables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iptables.c b/src/iptables.c index 0440cdf9..68219eef 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -1167,7 +1167,7 @@ static struct connman_iptables *iptables_init(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; |