From: Anthony DeRossi <ajderossi@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org, steffen.klassert@secunet.com,
davem@davemloft.net, kuba@kernel.org
Subject: Re: [PATCH ipsec] xfrm: Pass template address family to xfrm_state_look_at
Date: Tue, 3 Nov 2020 07:03:29 -0800 [thread overview]
Message-ID: <CAKkLME1ZGj0OQYbe-xhv5c7vyD9WApB7CsGuQmKZLiYRunG6BQ@mail.gmail.com> (raw)
In-Reply-To: <20201103120515.GA10759@gondor.apana.org.au>
On Tue, Nov 3, 2020 at 4:05 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Mon, Nov 02, 2020 at 06:32:19PM -0800, Anthony DeRossi wrote:
> > This fixes a regression where valid selectors are incorrectly skipped
> > when xfrm_state_find is called with a non-matching address family (e.g.
> > when using IPv6-in-IPv4 ESP in transport mode).
> >
> > The state's address family is matched against the template's family
> > (encap_family) in xfrm_state_find before checking the selector in
> > xfrm_state_look_at. The template's family should also be used for
> > selector matching, otherwise valid selectors may be skipped.
> >
> > Fixes: e94ee171349d ("xfrm: Use correct address family in xfrm_state_find")
> > Signed-off-by: Anthony DeRossi <ajderossi@gmail.com>
> > ---
> > net/xfrm/xfrm_state.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Your patch reintroduces the same bug that my patch was trying to
> fix, namely that when you do the comparison on flow you must use
> the original family and not some other value.
My mistake, I misunderstood the original bug.
Anthony
next prev parent reply other threads:[~2020-11-03 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 2:32 [PATCH ipsec] xfrm: Pass template address family to xfrm_state_look_at Anthony DeRossi
2020-11-03 12:05 ` Herbert Xu
2020-11-03 15:03 ` Anthony DeRossi [this message]
2020-11-03 12:08 ` Herbert Xu
2020-11-03 15:16 ` Anthony DeRossi
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=CAKkLME1ZGj0OQYbe-xhv5c7vyD9WApB7CsGuQmKZLiYRunG6BQ@mail.gmail.com \
--to=ajderossi@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.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;
as well as URLs for NNTP newsgroup(s).