diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2006-09-27 19:57:02 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2006-09-27 19:57:02 +0000 |
| commit | 9fddcc6661d2cf7bb8e704308437d2b1674b50be (patch) | |
| tree | a886251dab8c19f71a5bfd0199ec1d9b327b3513 /sys/net | |
| parent | 3ea944faa0a3cf1e2fdcd8279ea45c038d5173cf (diff) | |
Notes
Diffstat (limited to 'sys/net')
| -rw-r--r-- | sys/net/if_tap.c | 14 | ||||
| -rw-r--r-- | sys/net/if_tap.h | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index dd40cde2607a..1f0ed8984ce4 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -35,6 +35,7 @@ * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $ */ +#include "opt_compat.h" #include "opt_inet.h" #include <sys/param.h> @@ -612,6 +613,10 @@ tapioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td struct tapinfo *tapp = NULL; int s; int f; +#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD4) + int ival; +#endif switch (cmd) { case TAPSIFINFO: @@ -686,8 +691,15 @@ tapioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td bcopy(&ifp->if_flags, data, sizeof(ifp->if_flags)); break; +#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD4) + case _IO('V', 0): + ival = IOCPARM_IVAL(data); + data = (caddr_t)&ival; + /* FALLTHROUGH */ +#endif case VMIO_SIOCSIFFLAGS: /* VMware/VMnet SIOCSIFFLAGS */ - f = *(intptr_t *)data; + f = *(int *)data; f &= 0x0fff; f &= ~IFF_CANTCHANGE; f |= IFF_UP; diff --git a/sys/net/if_tap.h b/sys/net/if_tap.h index daaddf73d648..0086285e340c 100644 --- a/sys/net/if_tap.h +++ b/sys/net/if_tap.h @@ -57,7 +57,7 @@ struct tapinfo { #define TAPGIFINFO _IOR('t', 92, struct tapinfo) /* VMware ioctl's */ -#define VMIO_SIOCSIFFLAGS _IO('V', 0) +#define VMIO_SIOCSIFFLAGS _IOWINT('V', 0) #define VMIO_SIOCSKEEP _IO('V', 1) #define VMIO_SIOCSIFBR _IO('V', 2) #define VMIO_SIOCSLADRF _IO('V', 3) |
