diff options
| author | Aron Xu <aron@debian.org> | 2016-12-20 20:07:38 +0800 |
|---|---|---|
| committer | Aron Xu <aron@debian.org> | 2016-12-20 20:07:38 +0800 |
| commit | 3bf5cabfc7d7a3c7fdb4e2bc3d771d2a07db8bc0 (patch) | |
| tree | 1ac587c7e73af842b847599dc29b44430bf112ff /src/devices/tests | |
| parent | 1836daa45f4f0d8d0b791ed020774b915e9dd92d (diff) | |
| parent | 45cb5bb3c0e6edb887cf69b417fcaf7053814a9b (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.c | 4 |
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); |