From nobody Mon Apr 10 05:08:04 2023 X-Original-To: dev-commits-src-branches@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 4PvxnK2BZlz44mx2; Mon, 10 Apr 2023 05:08:05 +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 4PvxnJ5tRwz3QHj; Mon, 10 Apr 2023 05:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681103284; 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=ZZC6XCMEk7zDdNx6sONaPcdwt+FbmhQeZ0kPEpCUWOc=; b=ANUZ1iABZoK7fi9TeVUhx22P6sjUIALojkrQZECzu7zjaD5Krj0YUT1N4YLey45W34G21D fQW9rHdr0JoPJO2Kq6D9GzlQDIA6hN3tcW2psiGC3qdEfS+3cwwsxol5UsxfZ4YjzchnIi 5CLRKLpSn+o7W1p9AvgYvrNo3OcEQQ+M+PL3hvNhzDuUz3o5Q183L3Tbgucum4fWjxqAtc /390wabJIPznxELDVoSCdwOGVZVYJICMyuX550fwGExwg1VruMeOGCVbz2fXuEKEIHM+/F xyfJ/BD2v0bQlgcYcZ4Se6zmkZ+P6P4avq0HvnMX6TlSYQFoEsdAp+ohLVvheA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681103284; 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=ZZC6XCMEk7zDdNx6sONaPcdwt+FbmhQeZ0kPEpCUWOc=; b=YeDcgiq16a+4pTvEWAv/t+HHhPg/TqAMviHxVoMj4tM8PebEetOlUNhAfn28VicT2+v7b2 xHdXfI0MRsrZWvmnSklFnD1y2ABwum8Z11pg0nEUq1z8pbr47EZWjOGkYIjHPB8Cm2A5PZ CRAlmx9Zja906O7qNnLt2bbFZ8cgposuJyn28lOqgF4F7SeB3J598raGi4Tb7S1yGhI5o1 PvYX+DQLLuV09CaMnoiZZAY9NCC01SO8nETC99EOsf6Pw+ztO97KmjwV3ZcpTOq75vy+AL 8ULZmLcI5G14OVg3fcjPT+X4QjFpslkFJbJrgXu3//z2n/916MA3I1VXddn2FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681103284; a=rsa-sha256; cv=none; b=erFtLmmaSjSxcp+zN6GszJ78WqocldzDSar77Wk6/wtdMWCtGJSEaCTgqM45haXg40RCns YuGPoH477rC2PxMSwtyO0bp6T8YcGoxNtclX6MWm2a3a5OjOQBuJSjtIeaOUn8XhVKMjlo E7Ar/rRxFmJ+cMNm2ADP3CUwroO5n//0easiJrLUpSWDMHztrjbbTuvscGcYP1juNL7zq1 oB2EUtzU9W53Prt+zSV114de1usskClvWPfB+zOcU67sfyt1Tvi+1JPp8C89MW3QrY9dgW q0T03t0Ej5q1cUZXfdFJ/AS+4c2aLMTqggYIrol4EGmcjcUykTdgF+AuJEPUjA== 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 4PvxnJ4Zktzcn4; Mon, 10 Apr 2023 05:08:04 +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 33A584Ku022259; Mon, 10 Apr 2023 05:08:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33A584xM022258; Mon, 10 Apr 2023 05:08:04 GMT (envelope-from git) Date: Mon, 10 Apr 2023 05:08:04 GMT Message-Id: <202304100508.33A584xM022258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 59f3510ea793 - stable/12 - ifconfig: Fix configuring if_bridge with additional operating parameters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/12 X-Git-Reftype: branch X-Git-Commit: 59f3510ea793d35fbf2996087af5ab870cc0229f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=59f3510ea793d35fbf2996087af5ab870cc0229f commit 59f3510ea793d35fbf2996087af5ab870cc0229f Author: Zhenlei Huang AuthorDate: 2023-04-07 14:25:41 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-10 05:06:22 +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 (cherry picked from commit 09e5e3d598604167c1fb05e5cd0f41ed83314517) (cherry picked from commit bab5ce8deafb00683fb8319208750981e68d309c) --- 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 f4c51632bc98..afbe4b309cb5 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -89,7 +89,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;