]> git.wh0rd.org Git - home.git/commitdiff
vunshare: close socket after bringing up loopback
authorMike Frysinger <vapier@gentoo.org>
Wed, 16 Nov 2016 16:42:44 +0000 (11:42 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 16 Nov 2016 16:42:44 +0000 (11:42 -0500)
vunshare.c

index e76a9858c5a04855b8d7549a86a155440e2618c8..274eebcd9dc87e05008d3f57ff780012b1b2fb90 100644 (file)
@@ -62,6 +62,8 @@ static void unshare_net(void)
        ifr.ifr_flags |= IFF_UP | IFF_RUNNING;
        if (ioctl(sock, SIOCSIFFLAGS, &ifr) < 0)
                err(1, "ioctl(SIOCSIFFLAGS) failed");
+
+       close(sock);
 }
 
 static char **title_argv;