Date: Thu, 26 Oct 2023 10:01:52 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f407a72a506d - main - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) Message-ID: <202310261001.39QA1q2p034781@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f407a72a506d2630d60d9096c42058f12dff874e commit f407a72a506d2630d60d9096c42058f12dff874e Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2023-10-26 09:59:21 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2023-10-26 09:59:21 +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 --- 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?202310261001.39QA1q2p034781>