about summary refs log tree commit diff
path: root/src/devices/tests
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2016-12-20 20:07:38 +0800
committerAron Xu <aron@debian.org>2016-12-20 20:07:38 +0800
commit3bf5cabfc7d7a3c7fdb4e2bc3d771d2a07db8bc0 (patch)
tree1ac587c7e73af842b847599dc29b44430bf112ff /src/devices/tests
parent1836daa45f4f0d8d0b791ed020774b915e9dd92d (diff)
parent45cb5bb3c0e6edb887cf69b417fcaf7053814a9b (diff)
Merge tag 'upstream/1.4.4'
Upstream version 1.4.4
Diffstat (limited to 'src/devices/tests')
-rw-r--r--src/devices/tests/test-lldp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/tests/test-lldp.c b/src/devices/tests/test-lldp.c
index ff6f42a9..f6b6af90 100644
--- a/src/devices/tests/test-lldp.c
+++ b/src/devices/tests/test-lldp.c
@@ -352,7 +352,7 @@ _test_recv_fixture_setup (TestRecvFixture *fixture, gconstpointer user_data)
 	struct ifreq ifr = { };
 	int fd, s;
 
-	fd = open ("/dev/net/tun", O_RDWR);
+	fd = open ("/dev/net/tun", O_RDWR | O_CLOEXEC);
 	g_assert (fd >= 0);
 
 	ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
@@ -360,7 +360,7 @@ _test_recv_fixture_setup (TestRecvFixture *fixture, gconstpointer user_data)
 	g_assert (ioctl (fd, TUNSETIFF, &ifr) >= 0);
 
 	/* Bring the interface up */
-	s = socket (AF_INET, SOCK_DGRAM, 0);
+	s = socket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
 	g_assert (s >= 0);
 	ifr.ifr_flags |= IFF_UP;
 	g_assert (ioctl (s, SIOCSIFFLAGS, &ifr) >= 0);