import of dnsmasq-2.31.tar.gz

This commit is contained in:
Simon Kelley committed 2012-01-05 17:31:12 +00:00
1 parent 26d0dbaf24
commit 7cebd20fe7
32 files changed
+2294 -2141

No files matched your search

+6 -1
View File
@@ -48,7 +48,12 @@ void init_bpf(struct daemon *daemon)
{
sprintf(ifreq.iov_base, "/dev/bpf%d", i++);
if ((daemon->dhcp_raw_fd = open(ifreq.iov_base, O_RDWR, 0)) != -1)
return;
{
int flags = fcntl(daemon->dhcp_raw_fd, F_GETFD);
if (flags != -1)
fcntl(daemon->dhcp_raw_fd, F_SETFD, flags | FD_CLOEXEC);
return;
}
}
if (errno != EBUSY)
die(_("cannot create DHCP BPF socket: %s"), NULL);