freebsd-ports/security/vpnc/files/patch-sysdep.c
Steve Wills 39dddfb1cf security/vpnc: fix issue with destroying tun device on exit
While here, improve formatting and regenerate patches

PR:		241039
Submitted by:	kevans
Reported by:	Hrant Dadivanyan <hrant@dadivanyan.net>
2019-12-16 16:28:32 +00:00

23 lines
395 B
C

--- sysdep.c.orig 2019-10-03 14:54:58 UTC
+++ sysdep.c
@@ -91,6 +91,20 @@ typedef enum {
} search_if_en;
#endif
+#ifdef TUNSIFPID
+void tun_claim(int fd)
+{
+
+ ioctl(fd, TUNSIFPID, 0);
+}
+#else
+/* Nop; no protocol for doing this */
+void tun_claim(int fd)
+{
+
+}
+#endif
+
/*
* Allocate TUN/TAP device, returns opened fd.
* Stores dev name in the first arg(must be large enough).