Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2877503rwb; Fri, 11 Nov 2022 16:51:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf6c8TRRgK/sq+sjHhC0aJ4Zy9TIqsc1jxDQ2lHQE7jWN/2xkDUG+apQEK9LH89bkpQdyaqE X-Received: by 2002:a17:906:269a:b0:7ad:84cc:fb33 with SMTP id t26-20020a170906269a00b007ad84ccfb33mr3830454ejc.380.1668214308728; Fri, 11 Nov 2022 16:51:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668214308; cv=none; d=google.com; s=arc-20160816; b=qdrd6dJq3KMO/foqaS+F4/plIv2lbU7QbPMa/vqtTVOGOO3GNL+whN708pxtzJOX9k TZE98+9WeMG+j6kYCkCbHedmhIStrW6GIAMg3WD3vUAXqkdIpl7yc8pLkLvrJwqPdKNr GqxmHmFCJE01vHDvMgzuR87EbmUWltPEFOrQncI6ypu7vaMACqg2FDisyjWgUF0WcFhT DDalG3hSQGdsQh1tjlHjwA/GWDMMxSc3Y19c35GJAxFEy7z6+TpZ5zwo+7g5tATBLWIC vc6qllI3cP8fUQ2mFDMpraSV1CwZYIHYxnn/5IuUPas3C/Zqd2PAp8L6Y68xlgYW5YcF Ltmw== 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=fdrQvQlOWJwIL1OF472J6xVUPdWj669bW3nbDh+Epjs=; b=uMwq7cESggHwXOy5uKdORMOsgi00xqWxGWKzulJg5EqtL2+Ex+JnzhKEphMLwTyDN3 QrhFD3ozvAkebuRqq+P0KUdk7urXWivfYjBaIntL20axhkZhiJv770skyRkZbYirKLoz es82lChbDHHzaeHBMZOI22+pMKa5wx15Cxk2v6cPrmemg09KrchdN0xCoI9udmd+e7Ab kzUpnoqmucJX85sZhwZQlk2/uNwBI8/6Oj22C/zeNvBB2xPx0B0pI3Kytz5F8ncA09Ua 6nC2AlBCL1jLrPy1SzSJGnAqS/hJmTFX4YO/9bUgqmQLPnDbkfBxFAfvhf0tR3hsTvVv x98Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=BUxtyFxg; 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 b3-20020aa7c903000000b00463f8aad371si3247009edt.239.2022.11.11.16.51.27; Fri, 11 Nov 2022 16:51:48 -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=BUxtyFxg; 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 S234373AbiKLAKo (ORCPT + 90 others); Fri, 11 Nov 2022 19:10:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234140AbiKLAKl (ORCPT ); Fri, 11 Nov 2022 19:10:41 -0500 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0339B31355 for ; Fri, 11 Nov 2022 16:10:39 -0800 (PST) Received: by mail-yb1-xb36.google.com with SMTP id e68so4673035ybh.2 for ; Fri, 11 Nov 2022 16:10:38 -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=fdrQvQlOWJwIL1OF472J6xVUPdWj669bW3nbDh+Epjs=; b=BUxtyFxgJFO/zdooBLACb7F1+0jn7gdZhnzgAeVNlm8GnbC7VAlWWHysJEs8AG+wUK EaUeLhv9ZQ2H1TkOw8GHfRsUfWK+yGHfKUWrLF/mZhbfULKZRLWmgXgboe/v13H8LPA7 Y3lH5inNqlZDKRgU5pfWPhoV9ar8oRK+4kSimmq3onkueWCXHlMZlALDGyjp73MrLep1 jLOolGAlcndNK9YsJRFYYLen++nSKW4uwpagVpwPsbJqLgmkCxV4Jf+0lrMGGjfrjkQA MBp84LRg8ZCuLPn1urBAXdXTmjEw5whXzHgiooV2lj++YCR98wD2J1oj0Sopcy0BCTew 5GAA== 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=fdrQvQlOWJwIL1OF472J6xVUPdWj669bW3nbDh+Epjs=; b=28IPFF2EjYqm2ClrJ4T2js4N2ahXWUmgVAaZkw6WiI2DI9PDxWhoGgqGxeTsvTOVJE Bk8oX3GYZZb/w9q/2rDhLAQ2DiNRjy6VR2zXL3ZbeA/mQ4n22yBOQa6DHCYDbmuI3Amz BZNyJkywwy/6fk6r2pqlel7JkJUHBcc/yrXS7mEodAEd2FlT52k3GFdhPDHUf2eKV3JG 741hlEjnKF9Q2HZUiihre1lLW7WuLie5t/xmYrfGJ3cwikFowuaY7M7LJb0a2WQ7ijJ5 pL2EoQkKKqX2S47T1lSC/Ccd+RT67v6ggCvJdDQmpoOHJAvpdus6tEhxKLQcfcoVKrTN 2DWQ== X-Gm-Message-State: ANoB5pkoh5hLMDV1BN/GXlDA3zOIS8KxE7fWMHTk7kV4z93/C99usVhM g9m2C2nVxq/dKPF8J8E/U71p35+RHQqSOl3KZBAc3w== X-Received: by 2002:a05:6902:4aa:b0:6cb:ec87:a425 with SMTP id r10-20020a05690204aa00b006cbec87a425mr3562451ybs.387.1668211837901; Fri, 11 Nov 2022 16:10:37 -0800 (PST) MIME-Version: 1.0 References: <7ccd58e8e26bcdd82e66993cbd53ff59eebe3949.1668139105.git.jamie.bainbridge@gmail.com> <20221111092047.7d33bcd3@hermes.local> In-Reply-To: From: Eric Dumazet Date: Fri, 11 Nov 2022 16:10:26 -0800 Message-ID: Subject: Re: [PATCH v2] tcp: Add listening address to SYN flood message To: Jamie Bainbridge Cc: Stephen Hemminger , "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=unavailable 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 Fri, Nov 11, 2022 at 4:00 PM 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. > > Please let me know which advice to follow? IPv6 [address]:port is also a standard (and unambiguous) way. https://www.rfc-editor.org/rfc/rfc5952#page-11