Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp409884rdb; Wed, 20 Dec 2023 00:07:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaCrjM4mGflIvsW2o6zxH6ULDJAnIA42/BDD0b5rGFyW71S4RqWqqS6Ga2XkUiTcb41mJJ X-Received: by 2002:a05:6402:230f:b0:54c:e719:64ae with SMTP id l15-20020a056402230f00b0054ce71964aemr5367383eda.94.1703059624414; Wed, 20 Dec 2023 00:07:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703059624; cv=none; d=google.com; s=arc-20160816; b=zlUawf8q/9pKWxoDigmMdC952bHAuFLLcjzICvWuVQj+Hp6feyOZHRpAp52tJS9DM3 7Muq0833Mv8RkxdwkpTlGGfk1uCN49nUN0ZyXEBtSW7m0gOz5lGfu33gwnDLRxEZHPBn VD7GvJAKCzmt0HLfL7jOUZmnNDwxbHKlG+0lAokVmmE22VrtOgIUqRS4oUOOoPY7sCWx 1APcAIjCdk3oNHbx6LzN+NRCKAYvmXZIfV/T10zjTwzuDnKewH+PH11HZTq/d6hU5Fub 3tB/UwWq9C1VxCX9MEJ/ZZayEG1Ts4CMrwi1J1EUdVlDlzUWcQBPyZ/zFCqp8x+hJEGS 7fZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from; bh=L8Gc7Z/KryUovXIfVdSak1qYpAInvd2u3fDHyZP/qvs=; fh=nvfGW7CBxW7VE8DB4MrzPPfee9zbqRWf6WWBuSDG2fw=; b=aqRYhvOHc52taYw+Y44ba0hOnAjVSWbCteTMLfn558A3487s8k1n2Y6pf0dhbHQ9dh aRRlm72SSpOEsP33QOqs8Qqn8TwuQA4VZGM7vG4v8tlyjdQatubjIKHp518+jE56A+Av VPVPQQWinLXxVHR30QbANSpsj+jeOHMlTvfFdHodHlRBCxx16gKuhTVHCpL6G67Zcw6Z pDxpCfEsHXWJ7H1MIv43W5tMLn327VFpUhyjSAAuwyQZ5Eqqja8CxV07a7urdOqMtVoc GShYGRSuYYMDxzHJedCSQqJl/bcScVWrns54WNCtpJVwgcSEItXRdyyfrL+kmiM63JFq GC4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6535-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f11-20020a50d54b000000b00553eeeda3b0si112687edj.268.2023.12.20.00.07.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 00:07:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6535-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2E3B41F2360C for ; Wed, 20 Dec 2023 08:07:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5D2618647; Wed, 20 Dec 2023 08:06:55 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from zg8tmtu5ljg5lje1ms4xmtka.icoremail.net (zg8tmtu5ljg5lje1ms4xmtka.icoremail.net [159.89.151.119]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CAC71DDCF; Wed, 20 Dec 2023 08:06:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zju.edu.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zju.edu.cn Received: from localhost.localdomain (unknown [125.119.246.50]) by mail-app3 (Coremail) with SMTP id cC_KCgB37XDXnoJlw9gwAQ--.15347S4; Wed, 20 Dec 2023 15:59:20 +0800 (CST) From: Lin Ma To: roopa@nvidia.com, razor@blackwall.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horatiu.vultur@microchip.com, henrik.bjoernlund@microchip.com, bridge@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lin Ma Subject: [PATCH v1] bridge: cfm: fix enum typo in br_cc_ccm_tx_parse Date: Wed, 20 Dec 2023 15:59:14 +0800 Message-Id: <20231220075914.2426376-1-linma@zju.edu.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID:cC_KCgB37XDXnoJlw9gwAQ--.15347S4 X-Coremail-Antispam: 1UD129KBjvJXoW7Zr4DXry3WFykAF4DXw1UKFg_yoW8JFy5pF 4rKFykCFs0yryYvw1jvF4Ivry7CF4DW3y3C3yq9r1Syrn8WF13CrZ8Gry3ur1xAF4Dtw45 AF15WrW3Xa98AFUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvG14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4U JVW0owA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628v n2kIc2xKxwCY02Avz4vE14v_GF4l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr 0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY 17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcV C0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY 6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa 73UjIFyTuYvjfUYMKZDUUUU X-CM-SenderInfo: qtrwiiyqvtljo62m3hxhgxhubq/ Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: It appears that there is a typo in the code where the nlattr array is being parsed with policy br_cfm_cc_ccm_tx_policy, but the instance is being accessed via IFLA_BRIDGE_CFM_CC_RDI_INSTANCE, which is associated with the policy br_cfm_cc_rdi_policy. Though it seems like a harmless typo since these two enum owns the exact same value (1 here), it is quite misleading hence fix it by using the correct enum IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE here. Fixes: 2be665c3940d ("bridge: cfm: Netlink SET configuration Interface.") Signed-off-by: Lin Ma --- net/bridge/br_cfm_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_cfm_netlink.c b/net/bridge/br_cfm_netlink.c index 5c4c369f8536..2faab44652e7 100644 --- a/net/bridge/br_cfm_netlink.c +++ b/net/bridge/br_cfm_netlink.c @@ -362,7 +362,7 @@ static int br_cc_ccm_tx_parse(struct net_bridge *br, struct nlattr *attr, memset(&tx_info, 0, sizeof(tx_info)); - instance = nla_get_u32(tb[IFLA_BRIDGE_CFM_CC_RDI_INSTANCE]); + instance = nla_get_u32(tb[IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE]); nla_memcpy(&tx_info.dmac.addr, tb[IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC], sizeof(tx_info.dmac.addr)); -- 2.17.1