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:
Gleb Smirnoff 2023-10-26 02:59:21 -07:00
parent d3a36e4b74
commit f407a72a50

View file

@ -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;
}