]> git.wh0rd.org - home.git/blobdiff - vunshare.c
vunshare: close socket after bringing up loopback
[home.git] / 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;