Date: Tue, 19 Mar 2019 00:27:52 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 235704] [net] [patch] tun(4) can't be destroyed on a VNET jail if it's renamed Message-ID: <bug-235704-7501-V7knuH4J7z@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-235704-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-235704-7501@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235704 --- Comment #13 from commit-hook@freebsd.org --- A commit references this bug: Author: kp Date: Tue Mar 19 00:27:46 UTC 2019 New revision: 345285 URL: https://svnweb.freebsd.org/changeset/base/345285 Log: MFC r344794: tun: VIMAGE fix for if_tun cloner The if_tun cloner is not virtualised, but if_clone_attach() does use a virtualised list of cloners. The result is that we can't find the if_tun cloner when we try to remove a renamed tun interface. Virtualise the cloner, and move the final cleanup into a sysuninit so that we're sure this happens after all of the vnet_sysuninits Note that we need unit numbers to be system-unique (rather than unique per vnet, as is done by if_clone_simple()). The unit number is used to create the corresponding /dev/tunX device node, and this node must match with the interface. Switch to if_clone_advanced() so that we have control over the unit numbers. Reproduction scenario: jail -c -n foo persist vnet jexec test ifconfig tun create jexec test ifconfig tun0 name wg0 jexec test ifconfig wg0 destroy PR: 235704 Reviewed by: bz, hrs, hselasky Differential Revision: https://reviews.freebsd.org/D19248 Changes: _U stable/12/ stable/12/sys/net/if_tun.c --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235704-7501-V7knuH4J7z>