summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net/if_tun.c3
-rw-r--r--sys/net/if_tun.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index ff60749..7ad4d59 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -461,6 +461,9 @@ tunioctl(dev, cmd, data, flag, p)
return(EINVAL);
}
break;
+ case TUNSIFPID:
+ tp->tun_pid = curproc->p_pid;
+ break;
case FIONBIO:
break;
case FIOASYNC:
diff --git a/sys/net/if_tun.h b/sys/net/if_tun.h
index 999372b..273bb30e 100644
--- a/sys/net/if_tun.h
+++ b/sys/net/if_tun.h
@@ -41,5 +41,6 @@ struct tuninfo {
#define TUNGIFINFO _IOR('t', 92, struct tuninfo)
#define TUNSLMODE _IOW('t', 93, int)
#define TUNSIFMODE _IOW('t', 94, int)
+#define TUNSIFPID _IO('t', 95)
#endif /* !_NET_IF_TUN_H_ */
OpenPOWER on IntegriCloud