summaryrefslogtreecommitdiffstats
path: root/bpf.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-06-10 22:23:57 +0000
committerRoy Marples <roy@marples.name>2008-06-10 22:23:57 +0000
commiteb942e0abce48272767404ca604573d3ea674302 (patch)
tree479c4d8049b34bb3758034ca0bd2354dce079ce3 /bpf.c
parent7349c9bf8cf950dfb92d53f9a860f34b33d97229 (diff)
downloaddhcpcd-eb942e0abce48272767404ca604573d3ea674302.tar.xz
Remove the signal array stack as our pipe handling should be secure enough now. Also, move the normalize close_on_exec and setting non block.
Diffstat (limited to 'bpf.c')
-rw-r--r--bpf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bpf.c b/bpf.c
index ed9c4a1d..3cbfc40c 100644
--- a/bpf.c
+++ b/bpf.c
@@ -121,7 +121,8 @@ open_socket(struct interface *iface, int protocol)
}
if (ioctl(fd, BIOCSETF, &pf) == -1)
goto eexit;
- close_on_exec(fd);
+ if (set_cloexec(fd) == -1)
+ goto eexit;
if (*fdp != -1)
close(*fdp);
*fdp = fd;