From nobody Wed Jan 18 10:05:20 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxhG84zXmz2smCR for ; Wed, 18 Jan 2023 10:05:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxhG82SzGz43fP for ; Wed, 18 Jan 2023 10:05:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674036320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ds69DWzDIIpOoqRQ6phFrXGdb9kTL9qqAU5FHfFWang=; b=L0D7PLBujAGmlzTNNxvAIHlZnGN6QFL4PoQ7YkOqlq9q1IOxtPHBiCkFRRUrHF0LxZrNB3 bTcN+UDCLsdyaIxoeFUj7A3mfI5nj7HfPPQWiu0tzfZMKgJAyVdT+JeJ3ZNZvQVQofNGK3 0+2qQLuMD3wPx6nP7EYZUvzy+yLPqv0CkazujgVIbUeVHu9JOInVW3s7AJrlG0QNmr7Iaz +sN42ipwKvwH1/2FdkgWhDnb3FLl4BP0EdDsxEo93shpxb/XcQqSnSiPB5f525HGAJrRIs g1XnTvM6F1gusxV4iqowXEJOse291thxOasnH3yJUBNZ/jnGb0Bl3PUNrARHhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674036320; a=rsa-sha256; cv=none; b=joMNkJ3aicqzLcPnq9hYO9eHAfoyFt2fXcCzV1s/F7turaMC3s7HPPVuVYq/t3AAGHRtil /h7q3/xAEc6JlUsy70gB+4LDYToLtqj23he8p4SPQxTVDjwbwTxLWyX2XgVOBbTdzyYfxT R+U4ZSh4aIzFgWmauey+s1GU0fY/J34mLNcTptBjUFwR6KNQxNnPZmeYEg3fa4vUY8MEuR cXi7YGQhXZTaSjBX1fQB9sLTKzxfAEp4NtBCfvqaNCCqW/jorG/qviVucuH2kPEGzLFb4G M2tdRDnynGomOP0RwRiyePncj42+Kjm8ODM+7MOddIB7HcvMkEQzY6YaYGXS0A== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxhG81Y3bz16mv for ; Wed, 18 Jan 2023 10:05:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 30IA5KGS079623 for ; Wed, 18 Jan 2023 10:05:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 30IA5K7w079622 for bugs@FreeBSD.org; Wed, 18 Jan 2023 10:05:20 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: bugs@FreeBSD.org Subject: [Bug 185619] [VNET] Name conflict not checked when a child vnet goes away and returns its interface(s) back to the parent Date: Wed, 18 Jan 2023 10:05:20 +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: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: zlei@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D185619 Zhenlei Huang changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kp@freebsd.org, | |melifaro@FreeBSD.org --- Comment #4 from Zhenlei Huang --- (In reply to Eugene M. Kim from comment #0) > Option 2 is more predictable and deterministic, at the cost of more compl= ex=20 > implementation. And it doesn't cover the case of pseudo-interfaces creat= ed locally=20 > inside a vnet, because such interfaces have no shadowed name in the paren= t vnet;=20 > falling back to option 1 would be one way to solve this. For pseudo-interfaces created locally inside a vnet (n), their's `home-vnet= ` is same with its vnet (n) and will be destroyed on vnet destroy, so no name conflicts. I think that is a design defeat, as FreeBSD assumes the name of interface is unique in one vnet (namespace) and it allows renaming interfaces. An combination of Option 1 and Option 2: > Option 1: Give the returned interface a random, unique name. > Option 2: When injecting an interface into a child vnet, leave a "shadow"= of its > name in the parent vnet. Don't let other interfaces in the parent vnet t= ake the=20 > shadowed name, and give the shadowed name to the moved interface when it = returns=20 > from the child vnet. I think we may give the interface a global unique unchangeable name (called xname) on create (physical or cloned ones), and refine current name as an a= lias and guarantee the uniqueness only within its vnet (namespace). (In practica= l an interface may have multiple aliases). On vnet destroy an interface returns to its home-vnet, if the alias name conflicts we can remove the alias. That may require KPI/ABI changes. Linux has similar mechanic called `altname`, see https://lwn.net/Articles/794289/=20 CC @kp and @melifaro --=20 You are receiving this mail because: You are the assignee for the bug.=