Merge "set O_CLOEXEC on /dev/tun open"

am: 68fd19b04c

Change-Id: I3edea2f3738764d486a7b60a8f13697396d2ef7d
This commit is contained in:
Nick Kralevich
2018-11-01 17:15:03 -07:00
committed by android-build-merger

View File

@@ -57,7 +57,7 @@ static inline in_addr_t *as_in_addr(sockaddr *sa) {
static int create_interface(int mtu)
{
int tun = open("/dev/tun", O_RDWR | O_NONBLOCK);
int tun = open("/dev/tun", O_RDWR | O_NONBLOCK | O_CLOEXEC);
ifreq ifr4;
memset(&ifr4, 0, sizeof(ifr4));