netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lucien.xin@gmail.com
Cc: netdev@vger.kernel.org, dsahern@gmail.com
Subject: Re: [PATCH net] ipv6: fix the check before getting the cookie in rt6_get_cookie
Date: Wed, 05 Jun 2019 17:01:08 -0700 (PDT)	[thread overview]
Message-ID: <20190605.170108.1814605190881194288.davem@davemloft.net> (raw)
In-Reply-To: <49388c263f652f91bad8a0d3687df7bb4a18f0da.1559473846.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Sun,  2 Jun 2019 19:10:46 +0800

> In Jianlin's testing, netperf was broken with 'Connection reset by peer',
> as the cookie check failed in rt6_check() and ip6_dst_check() always
> returned NULL.
> 
> It's caused by Commit 93531c674315 ("net/ipv6: separate handling of FIB
> entries from dst based routes"), where the cookie can be got only when
> 'c1'(see below) for setting dst_cookie whereas rt6_check() is called
> when !'c1' for checking dst_cookie, as we can see in ip6_dst_check().
> 
> Since in ip6_dst_check() both rt6_dst_from_check() (c1) and rt6_check()
> (!c1) will check the 'from' cookie, this patch is to remove the c1 check
> in rt6_get_cookie(), so that the dst_cookie can always be set properly.
> 
> c1:
>   (rt->rt6i_flags & RTF_PCPU || unlikely(!list_empty(&rt->rt6i_uncached)))
> 
> Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes")
> Reported-by: Jianlin Shi <jishi@redhat.com>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied and queued up for -stable.

  reply	other threads:[~2019-06-06  0:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-02 11:10 [PATCH net] ipv6: fix the check before getting the cookie in rt6_get_cookie Xin Long
2019-06-06  0:01 ` David Miller [this message]
2019-06-06 15:35 ` David Ahern
2019-06-06 16:10   ` Xin Long
2019-06-06 22:44     ` David Ahern

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=20190605.170108.1814605190881194288.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=lucien.xin@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;
as well as URLs for NNTP newsgroup(s).