Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1416075rwb; Thu, 10 Nov 2022 16:08:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM6PCNrx66eWGnBdmZI0F/IVsAsNrcCMoSyXHI7F20gl4/8ITf6C37p0LvqPhsK63jVRV2Eg X-Received: by 2002:a05:6402:1847:b0:464:718c:b271 with SMTP id v7-20020a056402184700b00464718cb271mr3716981edy.287.1668125303613; Thu, 10 Nov 2022 16:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668125303; cv=none; d=google.com; s=arc-20160816; b=JcTA0LO1bUbYYxXsWN5KyPp0GC5a74NNx/XQSmiQucXzXhMnB76uZi5hHho/WUDEyF 5J5NO3pFD627aY7EhKlgn05Dbt7evAqLZ3mRQ5myeJmV3/MfgPx+MPJawJrjMOSmxYg8 1+5d7W8Yf+T098xBT8FmQzXHUoopy4Blhay6BG9ZsGXBw9Fh733P+RopbgdcgSDBHoNe kvVkc8AhvZHJ9zslqQs3KAz9aimc0axlpGTP+FVAB4YYedGM9B8nb7gO3pGKOHx66+X6 ZhUno6AWAlV31Fgsso2aP9B41bPMcs0lzuXou4B/4QsttbiLbG32nqWgqddMS1dHl+jZ Z6cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xfLacnantKXRxjNVVHTSBZWsiyUm2oVOFkyo5Ye8vho=; b=JGc4nnoorJnQP7Xsm9F8czwth2NT28161KfdKKgKyJWiezcXYfW826vq1YBtqTM2j8 hIV8Ivp9wwF5iikkFcf8x0PI75583wxkLM2L9OBlog1A5gv53td90bdV/BCrvuwgU+OA pCQDXbpV1qzx3gBuwLHMFRJamLICWff6wdEgdjvsdselCvm3mJd8Xetp95HOV9uwv1X5 HDzAoQJzwR+CFVAIFvwvk8AcbJM5MUbujtAUEGq/wz/sBukzoAS429LHDAqvw5Xnzp2O 0aeM/wa9dG/TdmLS0F3DqXGajNpGGeG9CDiMUCxOUYc9ZerDzE/kHrCXDL1gVaiHad4u uUzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=I9KGe+mg; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b21-20020a17090630d500b0078d44c5da0esi501385ejb.667.2022.11.10.16.08.01; Thu, 10 Nov 2022 16:08:23 -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=@google.com header.s=20210112 header.b=I9KGe+mg; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231157AbiKJXqV (ORCPT + 92 others); Thu, 10 Nov 2022 18:46:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbiKJXqR (ORCPT ); Thu, 10 Nov 2022 18:46:17 -0500 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51F015EF80 for ; Thu, 10 Nov 2022 15:46:15 -0800 (PST) Received: by mail-yb1-xb2a.google.com with SMTP id z192so4294169yba.0 for ; Thu, 10 Nov 2022 15:46:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xfLacnantKXRxjNVVHTSBZWsiyUm2oVOFkyo5Ye8vho=; b=I9KGe+mgJc+j1KDvmhurUILU8ru31t8U4b7ZhofT6dWsLWSSQ1K/wnxo+ABaWgqM21 2xL6AQNz1xJnkpacC6f0NdwkQPb9I8NH00rxgAkM6oR92W0Kbh5z69CTFeBFr5dzcEXI flhkvmTguhIIVC/gZ+o/vk/1AX3nLFyUt7bRY3m8Jfu9AkkbGqnCfBocqXw8pGJJu3Ip FV5NjcouhyqwRzq+K+oW6QxwAAQbxf+PchKV9y89u5tovEfWM2k2TpOYlkaPM1EZOoO2 JGrZspJM3gWBsVMrNBeC4rHpZD1+ob25F35zg6uPn7q+c0Bdh6XZWmaVKy+BI8jgN5pO vElQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xfLacnantKXRxjNVVHTSBZWsiyUm2oVOFkyo5Ye8vho=; b=KFtw/hrnuLcXV7DgI9gSFWrP/WJ5n6ZdLyncmXl6NGFlW4CZvbL1LQu8kXJHJJgceS m9nPM1YP97ZWY63KLeWSwovIGIiYTgUFmXPCOkT/jqwutMXuUEiG9ccOstMk4ghVLkXm Xm45KQpJ8Wbtp1PZIn20ck69NE1dgsc8DojsMFk5XX4le/V26IGZWmfl/yb6/wN3ORvO ttm/PuXELOBcEPCGT1Frl5itMho+sRhXnQ4uBi6I6/SivbbWC8rsWirffrbDejJDVbY7 Y2jfUVS96FQbsVq1rfWnv8vonMflS4me6WTv6/74Ar51lsckoE12jwCPeuNWxonkFrsc rFZw== X-Gm-Message-State: ACrzQf3MPInvmxHhqeoV27EbeVLNXqkOzwvUU7MkqrOMw4B7BChkYOPN 5kyZ8p4+tTyT1uJs/9/LWkJs7YLmFTegqt5EC2zMow== X-Received: by 2002:a25:3ac7:0:b0:6ca:b03:7111 with SMTP id h190-20020a253ac7000000b006ca0b037111mr1362050yba.598.1668123974256; Thu, 10 Nov 2022 15:46:14 -0800 (PST) MIME-Version: 1.0 References: <20221110153901.7daa86e1@hermes.local> In-Reply-To: <20221110153901.7daa86e1@hermes.local> From: Eric Dumazet Date: Thu, 10 Nov 2022 15:46:02 -0800 Message-ID: Subject: Re: [PATCH] tcp: Add listening address to SYN flood message To: Stephen Hemminger Cc: Jamie Bainbridge , "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Thu, Nov 10, 2022 at 3:39 PM Stephen Hemminger wrote: > > On Thu, 10 Nov 2022 21:21:06 +1100 > Jamie Bainbridge wrote: > > > + xchg(&queue->synflood_warned, 1) == 0) { > > +#if IS_ENABLED(CONFIG_IPV6) > > + if (sk->sk_family == AF_INET6) { > > + net_info_ratelimited("%s: Possible SYN flooding on port %d. IP %pI6c. %s. Check SNMP counters.\n", > > + proto, sk->sk_num, > > + &sk->sk_v6_rcv_saddr, msg); > > + } else > > +#endif > > + { > > + net_info_ratelimited("%s: Possible SYN flooding on port %d. IP %pI4. %s. Check SNMP counters.\n", > > + proto, sk->sk_num, &sk->sk_rcv_saddr, msg); > > + } > > + } > > > > Port number is unsigned not signed. > Message also seems overly wordy to me. Also, it is customary to use IP.port format (like most tools, see tcpdump)