Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2874430rwb; Fri, 11 Nov 2022 16:47:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5RqISm6h9XMohvwWEJb2LuzmN77R1JWUhunARFskhaqJ+/wP3h1M/4c5mTFFQoraP6nCbr X-Received: by 2002:a17:902:ab8c:b0:186:b19e:ea65 with SMTP id f12-20020a170902ab8c00b00186b19eea65mr4986715plr.57.1668214054863; Fri, 11 Nov 2022 16:47:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668214054; cv=none; d=google.com; s=arc-20160816; b=gnFqF0kJWfkK1mRN9iYS6V/d9Q109XSZcNkJ8jXNhWM3s+M1GpE2R2F0vrQDJNKHQr YqBpPjENDvmjXJ97bCYs9kbJQkvOXWlfa5SkgB9ocjY71sd3HKfvXWRNwJzH12yCCuWd t2c+OmoJSAqhyKOSkp3HfOpR8Pj6BzMQqkTA4YBsUlM9fzcKRR6AHgeWMPP8kpCy2Gjt +tKRRVdx4m1ICMoRBn7k7K3AG3kUqGbUKnKzyr09C3DYQl9Z4oqu7YXnvDOzGTD3Z9ei sk2R64J9+oWmikc2+eP+Gl4RYBkiU5u+udM4e5ONRS6jnbOp92UxstQRbE4J0UlnClwc AJoA== 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=pEQWZwaHwU7X6IcFAoC/0iUhJeCTsC1IYT4N9/c8U0A=; b=qkr7DMXU/9XXxDO5f6mHouTQ9Q712+qXW1uynYYoDsCv7abY1q24oltDlQfhsB8gSU p2EU+iHmYI6/RDy6bottjoEYwprsyysFLG9jrm0Ia5Qp0/70iI3/LIbv3H6xOQJF/MpW lV2AB02hvOPcKHYoUhyiSEhD4W9Ot3NXbrXwt4UYizPWrxr1g8od1Mn5Y5zQqj+A7KeV WAM0bGCmT7yOu8J1t06QHJtKd/2mRAd293MblABZEy9Zpb0BvBPk9vnmeD+XRBW6Ups2 srXRIUb9e+A5AYP1HfKX2FkviBxrPmiz3zlR9ldyhp87GKVNshEPXobS3jrcjDpySirG /bqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20210112.gappssmtp.com header.s=20210112 header.b=c7XIVp1I; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x70-20020a628649000000b0056bb98c611csi3721209pfd.226.2022.11.11.16.47.23; Fri, 11 Nov 2022 16:47:34 -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=@networkplumber-org.20210112.gappssmtp.com header.s=20210112 header.b=c7XIVp1I; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234425AbiKLAL2 (ORCPT + 90 others); Fri, 11 Nov 2022 19:11:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234051AbiKLALZ (ORCPT ); Fri, 11 Nov 2022 19:11:25 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E567CCCB for ; Fri, 11 Nov 2022 16:11:24 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id q1-20020a17090a750100b002139ec1e999so5966767pjk.1 for ; Fri, 11 Nov 2022 16:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=pEQWZwaHwU7X6IcFAoC/0iUhJeCTsC1IYT4N9/c8U0A=; b=c7XIVp1It0E9UswvFUEs/ySxkmdQ2RJ4W2OgLEaSKDlwrcseWqG6d4mQuqnk3PO9O1 t5glJ4iz4TgZd7wtrzVUWV2fF82c3ItDwnrCKa/KpmcBtFeCyoh9aLdwkrHav5eFjIhg ZA2YfIXHza9s756+KnXxkmt9ACM2Q7WORoGYyiotVt8d6YjC0OVgLk7Sj5n8NUivTe5K 8b+UOoaWjuP0+8aLuNYWqmSFrSP5xhRY8Fn/7pn2rTruUMoIFnut9LJ+qDXFsRSEjY5I CEQZ2UVa3m4FbJmTT44l341EYhwnIuRaTAPwI/zVHKeFvzhw9I40TghZ44528UW5vDsU ARUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pEQWZwaHwU7X6IcFAoC/0iUhJeCTsC1IYT4N9/c8U0A=; b=ptwiJiW7VTK1px+km1cX0wMasNyZUAWF5WPBjPTQ6+w4kkBijV/FjXljgRLTb94+mj /PvFhcgOP9TR4F1wLXLkFoupACp38ak7SRilQg/rzrk19NkNWape08OEMcpngfythp5L qEb9vcpodcSjfshTPTdnbFQafR41AJMIXFyWqo83ifLM0HvuEsdFC7jjJHidS4xc0MAi 1tnw64QUfAisjFotEqt00kcxeMZVolIAw95FVG9kPpewxHsvg8tPIfSqr2UWCA0+qJJN frLC1sp73Nh1gxsYua6Em3teLQz37bmFoFJ01LDg/iXqZadRbdoM26OKR4XixjEd7Eb4 PQxQ== X-Gm-Message-State: ANoB5plsI9nZbiK8D/Fbb4NAn/zv+/GIiqws52NiJl51e0rr0X+Vpyjv 1tTjiQ6GmZ5JZAYCWaPAK9pDXJGvXc2XKw== X-Received: by 2002:a17:902:6b05:b0:188:a6ea:27a1 with SMTP id o5-20020a1709026b0500b00188a6ea27a1mr4380050plk.164.1668211884418; Fri, 11 Nov 2022 16:11:24 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id pb5-20020a17090b3c0500b00212e5068e17sm2111701pjb.40.2022.11.11.16.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 16:11:23 -0800 (PST) Date: Fri, 11 Nov 2022 16:11:20 -0800 From: Stephen Hemminger To: Jamie Bainbridge Cc: Eric Dumazet , "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] tcp: Add listening address to SYN flood message Message-ID: <20221111161120.770b9db2@hermes.local> In-Reply-To: References: <7ccd58e8e26bcdd82e66993cbd53ff59eebe3949.1668139105.git.jamie.bainbridge@gmail.com> <20221111092047.7d33bcd3@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 Sat, 12 Nov 2022 10:59:52 +1100 Jamie Bainbridge wrote: > On Sat, 12 Nov 2022 at 04:20, Stephen Hemminger > wrote: > > > > On Fri, 11 Nov 2022 14:59:32 +1100 > > Jamie Bainbridge wrote: > > > > > + 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, > > > + sk->sk_num, msg); > > > + } else { > > > + net_info_ratelimited("%s: Possible SYN flooding on port %pI4.%u. %s.\n", > > > + proto, &sk->sk_rcv_saddr, > > > + sk->sk_num, msg); > > > > Minor nit, the standard format for printing addresses would be to use colon seperator before port > > > > if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) { > > net_info_ratelimited("%s: Possible SYN flooding on [%pI6c]:%u. %s.\n", > > proto, &sk->sk_v6_rcv_saddr, sk->sk_num, msg); > > } else { > > net_info_ratelimited("%s: Possible SYN flooding on %pI4:%u. %s.\n", > > proto, &sk->sk_rcv_saddr, sk->sk_num, msg); > > I considered this too, though Eric suggested "IP.port" to match tcpdump. That works, if it happens I doubt it matters.