From owner-freebsd-net@freebsd.org Thu Feb 28 15:27:52 2019 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE250150B8C1 for ; Thu, 28 Feb 2019 15:27:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 438006FFDC for ; Thu, 28 Feb 2019 15:27:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 03D13150B8BE; Thu, 28 Feb 2019 15:27:51 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3E40150B8BC for ; Thu, 28 Feb 2019 15:27:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E5346FFD8 for ; Thu, 28 Feb 2019 15:27:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id B0BC219121 for ; Thu, 28 Feb 2019 15:27:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x1SFRnBE075147 for ; Thu, 28 Feb 2019 15:27:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x1SFRnsJ075145 for net@FreeBSD.org; Thu, 28 Feb 2019 15:27:49 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Thu, 28 Feb 2019 15:27:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: patch, vimage X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: genneko217@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2019 15:27:52 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235704 --- Comment #9 from genneko217@gmail.com --- Sorry to bother you again and again, but let me ask one more thing. Because some interface types (tap, vxlan etc.) still don't have virtualized cloners, I think similar problems could occur to them. (I know this is truly a corner case, though.)=20 if_clone_destroy() in sys/net/if_clone.c has the following code to find the cloner for an interface to destroy. What I was wondering is why the line 263-267 (the first loop) and the line 271-278 (the second loop) use different code. Can't they be the same? (My original patch came from this question.) 261 /* Find the cloner for this interface */ 262 IF_CLONERS_LOCK(); 263 LIST_FOREACH(ifc, &V_if_cloners, ifc_list) { -> 264 if (strcmp(ifc->ifc_name, ifp->if_dname) =3D=3D 0) { 265 break; 266 } 267 } 268 #ifdef VIMAGE 269 if (ifc =3D=3D NULL && !IS_DEFAULT_VNET(curvnet)) { 270 CURVNET_SET_QUIET(vnet0); 271 LIST_FOREACH(ifc, &V_if_cloners, ifc_list) 272 if (ifc->ifc_type =3D=3D SIMPLE) { -> 273 if (ifc_simple_match(ifc, name)) 274 break; 275 } else { -> 276 if (ifc->ifc_match(ifc, name)) 277 break; 278 } 279 CURVNET_RESTORE(); 280 } 281 #endif --=20 You are receiving this mail because: You are the assignee for the bug.=