git: ef161a35012f - stable/13 - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Oct 2023 17:33:48 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ef161a35012f187273dafc634751c5eb5db06092 commit ef161a35012f187273dafc634751c5eb5db06092 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2023-10-26 09:59:21 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-10-27 17:33:34 +0000 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: fd8b9c73a5a63a7aa438a73951d7a535b4f25d9a (cherry picked from commit f407a72a506d2630d60d9096c42058f12dff874e) --- usr.sbin/bhyve/net_backends.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index 99781cfdcbb6..de6afab53854 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -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; }