git: abf5807ffc36 - releng/14.0 - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Oct 2023 20:29:03 UTC
The branch releng/14.0 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=abf5807ffc36516976426a83d94caf135d3ea814
commit abf5807ffc36516976426a83d94caf135d3ea814
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:28:23 +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.
Approved by: re (gjb)
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D42366
Fixes: fd8b9c73a5a63a7aa438a73951d7a535b4f25d9a
(cherry picked from commit f407a72a506d2630d60d9096c42058f12dff874e)
(cherry picked from commit 6f1ccbd587907c5eaf05ddd77d1e9f5e16b7aedc)
---
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;
}