Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2023 20:21:59 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 6f1ccbd58790 - stable/14 - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS)
Message-ID:  <202310262021.39QKLxm9070973@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=6f1ccbd587907c5eaf05ddd77d1e9f5e16b7aedc

commit 6f1ccbd587907c5eaf05ddd77d1e9f5e16b7aedc
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2023-10-26 09:59:21 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-10-26 20:21:22 +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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310262021.39QKLxm9070973>