Add a new TUNSIFPID ioctl to update the tun_pid (recorded in
tunopen) with the current pid.
This commit is contained in:
parent
341777d004
commit
bbdecb957c
@ -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:
|
||||
|
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user