Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp161340lqh; Thu, 30 May 2024 18:30:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiWelcNkCE/HKfPBPvaHRsA+0+JypOD9YukvWpxsp4bF48P7AFjWe/k+RBRu6QrIrE09Bzjkh4tqfQj0sRoV7H589otF6SvH35+DLGXQ== X-Google-Smtp-Source: AGHT+IHjcQspateCM0w2bkXAhKrDn+Tf6/bnM6oortYYjfYBKyxjpmpaXjB+IyRieW5chK1bt3VJ X-Received: by 2002:a17:903:2306:b0:1f6:343f:dc36 with SMTP id d9443c01a7336-1f636ff4c6emr5410195ad.5.1717119002849; Thu, 30 May 2024 18:30:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717119002; cv=pass; d=google.com; s=arc-20160816; b=HLD62B6J8Muxlk/MkQH/kmUbPTCAqVPelo8VTU3dDKdN/gijnw0ZzV8CY+6dokImCS iuc04jNFAAS08CzoWIVli6Wmd1lu5OnWoEnfQ6vE7JZxhroXAES0qpr6uAA0iokJX3Hh iT9juZB8WSFLQ4ZsBMcalWlPalfQ6GTc+cMf99EVP7XRRqveStPNcScRvSckvFFU1KBl SFyYR3CLpzzg7hh6/N7IxPWa3tH+7P4ytqofbydZNHztTWKtgos94HPpXD2pshhU+7E2 v1zkBFdp41NN1EiVKYO1PEkbXhTVrSq41LwpskMj14NrWxppSUndAH3oyOYhNFJRI2C6 yWlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=drcd0Y2HV6YX1zRcm08lyAscaWU7emeFdnHfG9Kf5uk=; fh=oYfbr2V118+Nf0PBKCKna1ZQv7Nh1S7E1kd0g1UVZbk=; b=nW7zAmH9UpF0ru02CZEUS0xeCmVannp9Y7ju1MiWvM1Ye1elBv+MW4NMK6VzMcL5l0 2uMaPGloMZmGtW/2aNfEixSGZfl+aO6flW0hvHzML0LSSmhlh8N/+SiLA3X2GBfTgIzb Wz9ve0XJmXlTAMwR0Iu9nlug8EqRYcN+rEiUMDuZZcwx46dS8z8hHt+YbYialjsyNH60 XdTyB4m5qOLPgZiYcvh5deHeM2fs6GFckTjjQS25MR06kBF1/Ffl24d5h2jEMbfSa2p7 GDofn8jNc60HH9Em1G4k6EEa+UwqWZEG627BnXMxiLNCm8kr2qyfObPGrvNKT41eKb8s u9Wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=zju.edu.cn); spf=pass (google.com: domain of linux-kernel+bounces-196137-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196137-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f632416a11si6157285ad.570.2024.05.30.18.30.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 18:30:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196137-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=zju.edu.cn); spf=pass (google.com: domain of linux-kernel+bounces-196137-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196137-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 78760288F56 for ; Fri, 31 May 2024 01:30:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45C2AEAE9; Fri, 31 May 2024 01:29:51 +0000 (UTC) Received: from zg8tmtu5ljy1ljeznc42.icoremail.net (zg8tmtu5ljy1ljeznc42.icoremail.net [159.65.134.6]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69CF0D26A; Fri, 31 May 2024 01:29:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.65.134.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717118990; cv=none; b=tBwtAMY5HXxnfi0H7VHw8+s58qbwUL3FXiDr64rAMzKg79S3FStlY8ygDV/c6J/HBksvXXs6pwkqpSu5GjazNoPmbLHtGtCTk6exos+++HHPBU/2E5aM8S34u3C0t0p+bu6QSw5X07a8GdI+1nw1k3tmKS+Lb2iLD06enNytQFg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717118990; c=relaxed/simple; bh=cN24PCts8cd/+uVtUS2fsYyNPhWnS9RM9MgIE/6VNN0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=C//G1e6XXuM55pFGIQdwPGHTrOknEe83NFtNOIWOdihocxt2CVzdaoCb+r+olUugjvsNLvQlk4reTi2bgzphosRUNnfqGnzJmHaJK/ETRKPSqO2AotHdablPJgOquodcm/cxJtLDwPTq0gEM5Mlkmp7X7CLgaX/P7cYX100GMcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zju.edu.cn; spf=pass smtp.mailfrom=zju.edu.cn; arc=none smtp.client-ip=159.65.134.6 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 gui.. (unknown [125.120.154.162]) by mail-app4 (Coremail) with SMTP id cS_KCgCnNrTWJ1lmOB00AQ--.34291S4; Fri, 31 May 2024 09:28:55 +0800 (CST) From: Lin Ma To: pablo@netfilter.org, kadlec@netfilter.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lin Ma Subject: [PATCH net-next v1] netfilter: cttimeout: remove 'l3num' attr check Date: Fri, 31 May 2024 09:28:47 +0800 Message-Id: <20240531012847.2390529-1-linma@zju.edu.cn> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:cS_KCgCnNrTWJ1lmOB00AQ--.34291S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Gr18Cr4xKr4DAF13Ar4fKrg_yoWkGrg_Zr Wkta9rZF15Jw4qgw4UKa1fXr9rK34xWF1fuFyfX3y7J3s8twsYgrWv9as0yF17Cw1DKFyU Ar4vqryru343KjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb3xFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr1j 6rxdM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxa n2IY04v7MxkF7I0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4 AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE 17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMI IF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4l IxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvf C2KfnxnUUI43ZEXa7VUbGQ6JUUUUU== X-CM-SenderInfo: qtrwiiyqvtljo62m3hxhgxhubq/ After commit dd2934a95701 ("netfilter: conntrack: remove l3->l4 mapping information"), the attribute of type `CTA_TIMEOUT_L3PROTO` is not used any more in function cttimeout_default_set. However, the previous commit ea9cf2a55a7b ("netfilter: cttimeout: remove set but not used variable 'l3num'") forgot to remove the attribute present check when removing the related variable. This commit removes that check to ensure consistency. Signed-off-by: Lin Ma --- net/netfilter/nfnetlink_cttimeout.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/netfilter/nfnetlink_cttimeout.c b/net/netfilter/nfnetlink_cttimeout.c index f466af4f8531..eab4f476b47f 100644 --- a/net/netfilter/nfnetlink_cttimeout.c +++ b/net/netfilter/nfnetlink_cttimeout.c @@ -366,8 +366,7 @@ static int cttimeout_default_set(struct sk_buff *skb, __u8 l4num; int ret; - if (!cda[CTA_TIMEOUT_L3PROTO] || - !cda[CTA_TIMEOUT_L4PROTO] || + if (!cda[CTA_TIMEOUT_L4PROTO] || !cda[CTA_TIMEOUT_DATA]) return -EINVAL; -- 2.34.1