Date: Fri, 3 Apr 2015 17:40:06 +0300 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Juan Mojica <jmojica@gmail.com> Cc: FreeBSD Net <freebsd-net@freebsd.org> Subject: Re: Programmatically Creating VLAN in the Kernel Message-ID: <20150403144006.GZ64665@FreeBSD.org> In-Reply-To: <CAPKuH-zfRDxQ1U1kFdFr9PM76OD-AmxVpQ9-ya7t3fd2KQF=xw@mail.gmail.com> References: <CAPKuH-zfRDxQ1U1kFdFr9PM76OD-AmxVpQ9-ya7t3fd2KQF=xw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 30, 2015 at 09:49:56AM -0400, Juan Mojica wrote: J> I'm trying to programmatically create a VLAN in the kernel via ifioctl, but J> I'm hitting a "copyin" in the ioctl path, and since the address I'm passing J> in is a kernel address and not a user space address, the copyin is failing. J> J> Calling the ioctl from user space is a non-starter at this point, and I J> believe there will be other ioctls that will have to be called from the J> kernel which will hit the same issue. J> J> Any suggestions? J> J> So far I've thought about marking the ifreq flags to indicate the request J> came from the kernel and essentially bypass the copyin. Another option J> would be to make the create functions globally available, but this would J> violate the modularity of the VLAN module. If you really want to do that you need to export the vlan_cloner and its methods, then call vlan_clone_create directly. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150403144006.GZ64665>