From: David Miller <davem@davemloft.net>
To: brouer@redhat.com
Cc: netdev@vger.kernel.org, fweimer@redhat.com, hjl.tools@gmail.com
Subject: Re: [PATCH net] net: don't global ICMP rate limit packets originating from loopback
Date: Wed, 14 Jun 2017 15:34:27 -0400 (EDT) [thread overview]
Message-ID: <20170614.153427.2166855120464478061.davem@davemloft.net> (raw)
In-Reply-To: <149743965710.19877.13901728209731997446.stgit@firesoul>
From: Jesper Dangaard Brouer <brouer@redhat.com>
Date: Wed, 14 Jun 2017 13:27:37 +0200
> Florian Weimer seems to have a glibc test-case which requires that
> loopback interfaces does not get ICMP ratelimited. This was broken by
> commit c0303efeab73 ("net: reduce cycles spend on ICMP replies that
> gets rate limited").
>
> An ICMP response will usually be routed back-out the same incoming
> interface. Thus, take advantage of this and skip global ICMP
> ratelimit when the incoming device is loopback. In the unlikely event
> that the outgoing it not loopback, due to strange routing policy
> rules, ICMP rate limiting still works via peer ratelimiting via
> icmpv4_xrlim_allow(). Thus, we should still comply with RFC1812
> (section 4.3.2.8 "Rate Limiting").
>
> This seems to fix the reproducer given by Florian. While still
> avoiding to perform expensive and unneeded outgoing route lookup for
> rate limited packets (in the non-loopback case).
>
> Fixes: c0303efeab73 ("net: reduce cycles spend on ICMP replies that gets rate limited")
> Reported-by: Florian Weimer <fweimer@redhat.com>
> Reported-by: "H.J. Lu" <hjl.tools@gmail.com>
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Applied and queued up for -stable, thanks Jesper.
prev parent reply other threads:[~2017-06-14 19:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 11:27 [PATCH net] net: don't global ICMP rate limit packets originating from loopback Jesper Dangaard Brouer
2017-06-14 19:34 ` David Miller [this message]
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=20170614.153427.2166855120464478061.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=brouer@redhat.com \
--cc=fweimer@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=netdev@vger.kernel.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