From nobody Fri Apr 7 14:26:49 2023 X-Original-To: dev-commits-src-main@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 4PtLKP4Jkgz44hdV; Fri, 7 Apr 2023 14:26:49 +0000 (UTC) (envelope-from git@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 4PtLKP2yCgz3xVC; Fri, 7 Apr 2023 14:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680877609; 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; bh=+V98WPA5dGyaY1ORGhsWY5L4ihrRsb7NQHkkFZTa02E=; b=rayftcs2Guj1u+8ufDlelGQN5nQVmzRnYzX5rwTpk23/aFiCS4XK4kyerZk2xP+Lp0669E jHxbb18TcL0Z0ezpLkxTO+LTxkrSpzxFCu590TLPkP3VtJN1kngejxdZDURpD+X5hxVijc dbS3Ib5LISr/785ydf//ybUlJ+MvmW9KEPAZREaWvyTgqodXA//rrizz4NWPSNqYHXpwwv fU5tqMWyjVwWP3yAA+sgUWec11aWDxcaD3zGiYHZxsZ4b2aPGw4O7U3JR0ZBTogHdypmTH /COYfgZ74jGXa14s7+qNlCDZa2a7Fg9ldomiF+r7kWogSu3XkJKb2NP45Q1CQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680877609; 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; bh=+V98WPA5dGyaY1ORGhsWY5L4ihrRsb7NQHkkFZTa02E=; b=AErxSSmCgHNjM387lsv2dwRQI1eynLUUs1WOr9gKn0O2ct/o0Jhx8rwGZiMazSjbSjZQwu bSjrBK846tYWTmC180MqALd+LIqBVn43N44FeXPDDoB2feo0zpW/U4Bf4NdmqFdUvabv5y xdK4A1k8AZ+YX50jTJA/FlkW5Dvhlbq5QLzKXE9gU2dPmBRXrcmTnw2W9HrApvUtna8F2J q8eEDx236bRHKtgYtaYjI3yW5vK0NrlLRVkNzBHYMZ/yKZ0Ow4nU/h/Z3aVkZMkcJeRdEo 7IyMEJrZ24SISnGVBThiCIdJO2ZhuL8N+J2UpVB6OZWuas/QXgzhmEBOZXV2lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680877609; a=rsa-sha256; cv=none; b=ngIc5LGgHTCpOkuxCWr2VpnvbGatqc0WmDnc4uay41aH79uU2zEko1KUPnY6BnKr82TQLM QU0sVehpcST4AzPRTC/v+MeC9uw47G2fySSCyN2ADCn+fcnqc2HW7iK1qUXYeRYLLDhAYS 6x1KLVfhD/ipPufKh2mcPAv6Eehhv5TGAvo/ZBZI6NosCGSmChOMSkJdKztBHWQfDBBaEa rW5fDq86UCLu3tt2jbtbm//ZQqUyPXqhPD82qfkHDAyJOiLdABMa9Cv2Q6XmnKC5h0brF/ /JAMCS2YdoJar6pipzrxGrlIIif6O5iQcUpoO6qddzaNNXbNAd/y0pXEa+wwJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4PtLKP24SRzpKF; Fri, 7 Apr 2023 14:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 337EQnKU014565; Fri, 7 Apr 2023 14:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 337EQn4U014564; Fri, 7 Apr 2023 14:26:49 GMT (envelope-from git) Date: Fri, 7 Apr 2023 14:26:49 GMT Message-Id: <202304071426.337EQn4U014564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 09e5e3d59860 - main - ifconfig: Fix configuring if_bridge with additional operating parameters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09e5e3d598604167c1fb05e5cd0f41ed83314517 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=09e5e3d598604167c1fb05e5cd0f41ed83314517 commit 09e5e3d598604167c1fb05e5cd0f41ed83314517 Author: Zhenlei Huang AuthorDate: 2023-04-07 14:25:41 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-07 14:25:41 +0000 ifconfig: Fix configuring if_bridge with additional operating parameters For clone create and rename operations, the interface name get back can be different from the one passed to ioctl(). Use the interface name we get back so that ifconfig will not return unexpected ENXIO. PR: 270618 Reviewed by: kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39396 --- sbin/ifconfig/ifbridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c index 2bd9c96f2489..3a78b068eb5d 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -91,7 +91,7 @@ do_cmd(int sock, u_long op, void *arg, size_t argsize, int set) memset(&ifd, 0, sizeof(ifd)); - strlcpy(ifd.ifd_name, ifr.ifr_name, sizeof(ifd.ifd_name)); + strlcpy(ifd.ifd_name, name, sizeof(ifd.ifd_name)); ifd.ifd_cmd = op; ifd.ifd_len = argsize; ifd.ifd_data = arg;