[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+TWNjZ3taWxOtPd2iXC6tJNwNJ2psQ+tarwOKY+BFmog@mail.gmail.com>
Date: Fri, 11 Nov 2022 16:10:26 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Jamie Bainbridge <jamie.bainbridge@...il.com>
Cc: Stephen Hemminger <stephen@...workplumber.org>,
"David S. Miller" <davem@...emloft.net>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
David Ahern <dsahern@...nel.org>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tcp: Add listening address to SYN flood message
On Fri, Nov 11, 2022 at 4:00 PM Jamie Bainbridge
<jamie.bainbridge@...il.com> wrote:
>
> On Sat, 12 Nov 2022 at 04:20, Stephen Hemminger
> <stephen@...workplumber.org> wrote:
> >
> > On Fri, 11 Nov 2022 14:59:32 +1100
> > Jamie Bainbridge <jamie.bainbridge@...il.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.
>
> 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
Powered by blists - more mailing lists