Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp995706pxp; Sun, 6 Mar 2022 03:12:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTjZDj/FL5eLyABF5XeSEG8IDrQ9Pp96b+ZnbqLTOXObQ8BcTcdhDnBQwGxWtu1NpOdJ7x X-Received: by 2002:a65:6942:0:b0:378:9365:5963 with SMTP id w2-20020a656942000000b0037893655963mr5745842pgq.142.1646565170148; Sun, 06 Mar 2022 03:12:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646565170; cv=none; d=google.com; s=arc-20160816; b=Fozm64OxwvULkbwhqltsVvcdUn9FaVB79cuMBm8WBzeHDUEyG4BJnYAOH5xViJq4SF 7CEr7dbSHIZ8Bmxl2EvRZrukJX6Im5ShSO4sOLTtZZyT02ABB6wYOK2cX3h+U1t5Tc1O UgDtMr/4l3x35+aJDPl+DItDEqF0j9B3Nv/e/cJDwh3BzwXgT6hp6yTQa1eyDaldqPlZ esh55YjnP+Tm1FSfeMmz23TR/lsE9FuAeqd3sXC9Gtn+rziz1KWoHOJIK3gRWQnv1hs5 O4aRkxGLd9pwLaxrNwxcx+mbx2PCqmSAdbufb+nCGo6FdcgF1URTQzrrVHW71ZmKCrpF ZZzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Gi/sdentGCwJJGJ5wrqkGxtQ+g48o6zHIXuxsk4d4Og=; b=XeWvBA5Q3iztVDG/p8yQlvUb3OkVBlZbfTANGI024EobFykRVKpNQTCedxXtNPn7WD MBjEFZAY3r3Lz6hgJ/wPQOlrXcItDTIgqFQawvPXm4ow2M2nmBLZ0CMIqzsSn2XcGaok y8jO/ewb4kLBaU1GA3IyMU8qYZRRY0tTcJ+rUyH3j3adUFQnDFXBPeZt4e1OjGqXi8Y/ 6wNK1OCZv+FdPkmEoHIWDd2Tdj2n509pStDP0Xf/zxcppuJwhTR62i2CGYy08j2DQJwK kSJ7M66yJ8ZjYAFcu8e9q+jghhs4+IrBmb5h8IeItWY1EhyaCTkqg2pKhgAqHPpqYORY sDLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ej+74qS6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a056a00228900b004e178447616si10173445pfe.374.2022.03.06.03.12.34; Sun, 06 Mar 2022 03:12:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ej+74qS6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231971AbiCESJ7 (ORCPT + 99 others); Sat, 5 Mar 2022 13:09:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbiCESJ6 (ORCPT ); Sat, 5 Mar 2022 13:09:58 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5ECEA3DDF1 for ; Sat, 5 Mar 2022 10:09:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646503747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Gi/sdentGCwJJGJ5wrqkGxtQ+g48o6zHIXuxsk4d4Og=; b=Ej+74qS6Blxr1HPxx7es8uxjv+lpCZ6aUZHW5Ek+uXxhicG3SFr7XL+JvSLaveqkqvPj+I af+lGr16CUJ8tGTjRhxmBSW+S7FnkO+JrVBf01mpEXE6rkAjzLhgZY6dPycMa1skfaERsv 8ELzG6ljFs2ik5/bNDKYiahWedzccGI= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-296-OJycTZS5MUCG-PQudT0kjA-1; Sat, 05 Mar 2022 13:09:06 -0500 X-MC-Unique: OJycTZS5MUCG-PQudT0kjA-1 Received: by mail-qv1-f69.google.com with SMTP id fw9-20020a056214238900b0043522aa5b81so9066964qvb.21 for ; Sat, 05 Mar 2022 10:09:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Gi/sdentGCwJJGJ5wrqkGxtQ+g48o6zHIXuxsk4d4Og=; b=2pLxe9qPsEkz113gvmUAaHmo6oJoUXlbdQC5J2ON/+gLi4kdPbOl229Ha1Ndx1jErm LQ57ftLeQGLKCzSpN7TC/KY/uBhnRyzcCg9oBt/8GmLKKRcFtkInWhVVpO6cnvAlBr5Z /RqrLuXa3FiAnwi5a0SvRDtVzoPLL0gyoWHidoQSKSWIxoNKK3oM6nzlNfoFfoyJSPDh +RFAt3kF/EHs5vpEpmzorbbfUQaE09ZR1xdSkA2P51DqL3XsbqXdefmC0czWt+B06fKl ze/Hza1KMJyLVRhJiwn4HSWQYfSEy5tC6VIGz8FOq1ETmM3mzjPQi5PdGagMq15fyqzl VDiw== X-Gm-Message-State: AOAM5304HhaXdv2gp1DwJhgsGpjHkQc7Gy9IR3zLIv32Joxh/QNb2EWZ bzvE2ZRSe9+PCeRdiOQ/6GP2TWekLWUgfDi43BFqluMIypAxUm6CaHBXh0zAAAqGNlRLLPpbwHX /kY/m/uW2o2OWkToBzTdFPJxs X-Received: by 2002:a05:620a:1720:b0:634:1cd4:5e5b with SMTP id az32-20020a05620a172000b006341cd45e5bmr2608686qkb.558.1646503745729; Sat, 05 Mar 2022 10:09:05 -0800 (PST) X-Received: by 2002:a05:620a:1720:b0:634:1cd4:5e5b with SMTP id az32-20020a05620a172000b006341cd45e5bmr2608676qkb.558.1646503745526; Sat, 05 Mar 2022 10:09:05 -0800 (PST) Received: from localhost.localdomain.com (024-205-208-113.res.spectrum.com. [24.205.208.113]) by smtp.gmail.com with ESMTPSA id x6-20020ac86b46000000b002e02be9c0easm5175904qts.69.2022.03.05.10.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Mar 2022 10:09:05 -0800 (PST) From: trix@redhat.com To: pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de, davem@davemloft.net, kuba@kernel.org Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Rix Subject: [PATCH] netfilter: conditionally use ct and ctinfo Date: Sat, 5 Mar 2022 10:08:53 -0800 Message-Id: <20220305180853.696640-1-trix@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Rix The setting ct and ctinfo are controlled by CONF_NF_CONNTRACK. So their use should also be controlled. Signed-off-by: Tom Rix --- net/netfilter/nfnetlink_log.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index d97eb280cb2e8..141e0ebf4bc23 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -629,9 +629,11 @@ __build_packet_message(struct nfnl_log_net *log, htonl(atomic_inc_return(&log->global_seq)))) goto nla_put_failure; +#if IS_ENABLED(CONFIG_NF_CONNTRACK) if (ct && nfnl_ct->build(inst->skb, ct, ctinfo, NFULA_CT, NFULA_CT_INFO) < 0) goto nla_put_failure; +#endif if ((pf == NFPROTO_NETDEV || pf == NFPROTO_BRIDGE) && nfulnl_put_bridge(inst, skb) < 0) -- 2.26.3