summaryrefslogtreecommitdiff
path: root/tools/tap-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tap-test.c')
-rw-r--r--tools/tap-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tap-test.c b/tools/tap-test.c
index c215945c..18fc00bc 100644
--- a/tools/tap-test.c
+++ b/tools/tap-test.c
@@ -80,7 +80,7 @@ static int create_tap(const char *ifname)
struct ifreq ifr;
int fd, val;
- fd = open("/dev/net/tun", O_RDWR);
+ fd = open("/dev/net/tun", O_RDWR | O_CLOEXEC);
if (fd < 0) {
perror("Failed to open TUN/TAP device");
return -1;