Don't destroy tun on SIGHUP
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#define IFF_TUN 0x0001
|
||||
#define IFF_NO_PI 0x1000
|
||||
#define TUNSETIFF _IOW('T', 202, int)
|
||||
#define TUNSETPERSIST _IOW('T', 203, int)
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -260,3 +261,9 @@ tun_set_mtu(char *dev_name, int mtu)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
tun_set_persist(int fd, int on)
|
||||
{
|
||||
return ioctl(fd, TUNSETPERSIST, on);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user