summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_tap.c')
-rw-r--r--sys/net/if_tap.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index dd40cde..1f0ed89 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;
OpenPOWER on IntegriCloud