Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 780ba322 authored by Nick Kralevich's avatar Nick Kralevich Committed by android-build-merger
Browse files

Merge "set O_CLOEXEC on /dev/tun open"

am: 68fd19b0

Change-Id: I3edea2f3738764d486a7b60a8f13697396d2ef7d
parents f2dc5a20 68fd19b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));