From: Eric Dumazet <edumazet@google.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Jamie Bainbridge <jamie.bainbridge@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tcp: Add listening address to SYN flood message
Date: Fri, 11 Nov 2022 16:14:39 -0800 [thread overview]
Message-ID: <CANn89i+sj9w+W3Mx-UsmaWzq_GcLwr=FQkHC61_2eBbvpVQQ1g@mail.gmail.com> (raw)
In-Reply-To: <20221111161120.770b9db2@hermes.local>
On Fri, Nov 11, 2022 at 4:11 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Sat, 12 Nov 2022 10:59:52 +1100
> Jamie Bainbridge <jamie.bainbridge@gmail.com> wrote:
>
> > On Sat, 12 Nov 2022 at 04:20, Stephen Hemminger
> > <stephen@networkplumber.org> wrote:
> > >
> > > On Fri, 11 Nov 2022 14:59:32 +1100
> > > Jamie Bainbridge <jamie.bainbridge@gmail.com> 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.
Note that "ss dst" really needs the [] notation for IPv6
ss -t dst "[::1]"
State Recv-Q Send-Q
Local Address:Port Peer Address:Port
Process
CLOSE-WAIT 1 0
[::1]:50584 [::1]:ipp
So we have inconsistency anyway...
As you said, no strong opinion.
next prev parent reply other threads:[~2022-11-12 0:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 3:59 [PATCH v2] tcp: Add listening address to SYN flood message Jamie Bainbridge
2022-11-11 17:20 ` Stephen Hemminger
2022-11-11 23:59 ` Jamie Bainbridge
2022-11-12 0:10 ` Eric Dumazet
2022-11-12 0:11 ` Stephen Hemminger
2022-11-12 0:14 ` Eric Dumazet [this message]
2022-11-14 0:37 ` Jamie Bainbridge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANn89i+sj9w+W3Mx-UsmaWzq_GcLwr=FQkHC61_2eBbvpVQQ1g@mail.gmail.com' \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=jamie.bainbridge@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stephen@networkplumber.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).