Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5280704rwb; Mon, 21 Nov 2022 20:05:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Eu3oBCah4Jns3r91SeUkW1uChZpUG1NUUBpSWP9kgfdF6vC+6Uj70b6J50fA8jlrCDPR9 X-Received: by 2002:a17:902:ca04:b0:17f:835e:ba13 with SMTP id w4-20020a170902ca0400b0017f835eba13mr2683762pld.51.1669089952515; Mon, 21 Nov 2022 20:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669089952; cv=none; d=google.com; s=arc-20160816; b=LgXl2noCN6I2FEEbOJDe5EhBv0Ql8Cxa65pSzQjLrvGEWBP6wldyF36fBKTVCMJoFD lWUtVQMxt8+fgKO0jlR4wlWlkUNlnmnIfTpXNv1Hex7Q9UvAo+gITTFOkA5t67dRhX2i xdoIhYv80U9CLUjfVV6B2do7+Kjf4N57G6d9PYoEIK8sfCz71dLmUCY58URLr29cv4fD HW/uLZdQGKJYTNAkSTcZEEm6eNu0QE3afRR1EaqEXZeMiVwGkrkX0eBaIOBdcHzOkQGz FcQHkfyZ8ivkaUyEsRsl1XdqOmU9kRhGjOE0IGlj6rFovkpClt35kW9RSg51NZJF4TcQ FNfQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fROJgbMwuECd0QV2ilGeiFMFnuyM8x1u1KHq59iyqdw=; b=fKjMDXRj/H2CmgB1AFQ+KTaCQpHopBaiOnbcmXf/jQg2LVLWUoITI8JSMWG8akdNwY BaNDx6wiX0pzFz7Hs9ukx8rllyWgFhRmxJEKUx7DV/O1Z8xp92EBRXeaiCFfnYBrFl7i tDQLibxqrOgt6pF2YBPX9y2phRRICHaSlXCzgU/nND36eXf1NIzme3o2v5FuAswlXx9U dYB5+2AosI4F4+HLB8n6WR/P/3PQl8YDPbKAfUvP2DfWzQLSJ1zcYE4CGn9bbasa2lL9 cjRKaS1Go2sOP/rbjyhUnB6R1KN85HjwmH8kM/uDAPPiGWlIespqsEREXU1xl/OK4VEB 9iug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lf7MNtUe; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020a170903230700b001890e4e7915si8888479plh.207.2022.11.21.20.05.35; Mon, 21 Nov 2022 20:05:52 -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=@kernel.org header.s=k20201202 header.b=Lf7MNtUe; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232327AbiKVDwU (ORCPT + 91 others); Mon, 21 Nov 2022 22:52:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231939AbiKVDwO (ORCPT ); Mon, 21 Nov 2022 22:52:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4BCD2B182; Mon, 21 Nov 2022 19:52:13 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6950861544; Tue, 22 Nov 2022 03:52:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36AABC433D6; Tue, 22 Nov 2022 03:52:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669089132; bh=RWB002zku9jkNyjRHnzm0iJ7hwXFfwF1xY7ksmp3tHs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Lf7MNtUeFCS9dZFnuqzVpzrMrmjaBTjmaab8OC9AnwhZX4Hu07u6Mjjq29HArIYqM m4FHPWEn+yLWz2l9nXsswaQuT01GT1FMWl4x8UperUKBrwhVrHaNlKgG4fVAiQDioh zOVo6C+7aKP9wa3AoU+Vq264OgVanBIjaYg6w7ZHLRf1oZyGS5Y/1xsFQC6hVVPAxK jCpef2lQ5pHAojOz5A/HQtEfgAqkuL07cppR0Qvbriv/UjLwoLNrWgDSgeMpzcOo16 j/FvoAbkNtefSsNycTYuL3KHOgyjZLM0a/D5d3aOrtrH/9tfyKwPYszJvOHAgYr9xZ Mol2IdfEgGlfw== Date: Mon, 21 Nov 2022 19:52:11 -0800 From: Jakub Kicinski To: Saeed Mahameed Cc: Geert Uytterhoeven , Jamie Bainbridge , Geert Uytterhoeven , Eric Dumazet , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Paolo Abeni , Chris Down , Stephen Hemminger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] tcp: Fix tcp_syn_flood_action() if CONFIG_IPV6=n Message-ID: <20221121195211.57748b1f@kernel.org> In-Reply-To: References: <20221116123115.6b49e1b8@kernel.org> <20221116141519.0ef42fa2@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Mon, 21 Nov 2022 14:44:19 -0800 Saeed Mahameed wrote: > there's a macro inet6_rcv_saddr(sk), we can use it instead of directly > referencing &sk->sk_v6_rcv_saddr, it already handles the case where > CONFIG_IPV6=n > > --- a/net/ipv4/tcp_input.c > +++ b/net/ipv4/tcp_input.c > @@ -6845,7 +6845,7 @@ static bool tcp_syn_flood_action(const struct sock *sk, const char *proto) > xchg(&queue->synflood_warned, 1) == 0) { > if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) { > net_info_ratelimited("%s: Possible SYN flooding on port [%pI6c]:%u. %s.\n", > - proto, &sk->sk_v6_rcv_saddr, > + proto, inet6_rcv_saddr(sk), Great, could you post a full patch? I haven't seen v2, now it's almost Thanksgiving..