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

Commit 6f787d1b 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

am: 780ba322

Change-Id: I2433ece20b0ac8704e6349c06860a9eec121d14f
parents 3584c0a0 780ba322
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));