svn commit: r343707 - head/sys/net
Gleb Smirnoff
glebius at FreeBSD.org
Sun Feb 3 08:28:03 UTC 2019
Author: glebius
Date: Sun Feb 3 08:28:02 2019
New Revision: 343707
URL: https://svnweb.freebsd.org/changeset/base/343707
Log:
Teach pfil_ioctl() about VIMAGE.
Submitted by: gallatin
Modified:
head/sys/net/pfil.c
Modified: head/sys/net/pfil.c
==============================================================================
--- head/sys/net/pfil.c Sun Feb 3 08:15:26 2019 (r343706)
+++ head/sys/net/pfil.c Sun Feb 3 08:28:02 2019 (r343707)
@@ -46,6 +46,8 @@
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/queue.h>
+#include <sys/ucred.h>
+#include <sys/jail.h>
#include <net/if.h>
#include <net/if_var.h>
@@ -495,6 +497,7 @@ pfil_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
{
int error;
+ CURVNET_SET(TD_TO_VNET(td));
error = 0;
switch (cmd) {
case PFILIOC_LISTHEADS:
@@ -507,9 +510,10 @@ pfil_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
error = pfilioc_link((struct pfilioc_link *)addr);
break;
default:
- return (EINVAL);
+ error = EINVAL;
+ break;
}
-
+ CURVNET_RESTORE();
return (error);
}
More information about the svn-src-all
mailing list