Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pabeni@redhat.com
Cc: netdev@vger.kernel.org, lbianconi@redhat.com, xmu@redhat.com
Subject: Re: [PATCH net] net: ipv4: avoid mixed n_redirects and rate_tokens usage
Date: Fri, 04 Oct 2019 17:28:08 -0700 (PDT)	[thread overview]
Message-ID: <20191004.172808.542472286230604033.davem@davemloft.net> (raw)
In-Reply-To: <25ac83a5c5660b43a27712d692266cd97668a2e4.1570194598.git.pabeni@redhat.com>

From: Paolo Abeni <pabeni@redhat.com>
Date: Fri,  4 Oct 2019 15:11:17 +0200

> Since commit c09551c6ff7f ("net: ipv4: use a dedicated counter
> for icmp_v4 redirect packets") we use 'n_redirects' to account
> for redirect packets, but we still use 'rate_tokens' to compute
> the redirect packets exponential backoff.
> 
> If the device sent to the relevant peer any ICMP error packet
> after sending a redirect, it will also update 'rate_token' according
> to the leaking bucket schema; typically 'rate_token' will raise
> above BITS_PER_LONG and the redirect packets backoff algorithm
> will produce undefined behavior.
> 
> Fix the issue using 'n_redirects' to compute the exponential backoff
> in ip_rt_send_redirect().
> 
> Note that we still clear rate_tokens after a redirect silence period,
> to avoid changing an established behaviour.
> 
> The root cause predates git history; before the mentioned commit in
> the critical scenario, the kernel stopped sending redirects, after
> the mentioned commit the behavior more randomic.
> 
> Reported-by: Xiumei Mu <xmu@redhat.com>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Fixes: c09551c6ff7f ("net: ipv4: use a dedicated counter for icmp_v4 redirect packets")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Applied and queued up for -stable.

      parent reply	other threads:[~2019-10-05  0:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 13:11 [PATCH net] net: ipv4: avoid mixed n_redirects and rate_tokens usage Paolo Abeni
2019-10-04 15:27 ` Lorenzo Bianconi
2019-10-05  0:28 ` 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=20191004.172808.542472286230604033.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=lbianconi@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xmu@redhat.com \
    /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