Date: Fri, 27 Oct 2023 17:33:48 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: ef161a35012f - stable/13 - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) Message-ID: <202310271733.39RHXmI7092472@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310271733.39RHXmI7092472>