bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS)
ioctl(2)'s with integer argument shall pass command argument by value,
not by pointer. The ioctl(2) manual page is not very clear about that.
See sys/kern/sys_generic.c:sys_ioctl() near IOC_VOID.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D42366
Fixes: fd8b9c73a5
This commit is contained in:
@@ -238,7 +238,7 @@ tap_init(struct net_backend *be, const char *devname,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, &up)) {
|
||||
if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, up)) {
|
||||
WPRINTF(("tap device link up failed"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user