Merge branch 'master' of black:tinc
[tinc] / src / linux / device.c
index 93d4b41..cbf2152 100644 (file)
@@ -73,6 +73,10 @@ static bool setup_device(void) {
                return false;
        }
 
+#ifdef FD_CLOEXEC
+       fcntl(device_fd, F_SETFD, FD_CLOEXEC);
+#endif
+
 #ifdef HAVE_LINUX_IF_TUN_H
        /* Ok now check if this is an old ethertap or a new tun/tap thingie */