All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eyal Birger <eyal.birger@gmail.com>
To: Corey Minyard <minyard@acm.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: IPSec questions and comments
Date: Sat, 24 Jul 2021 05:40:50 +0300	[thread overview]
Message-ID: <CAHsH6Gu12oTqeE_TV6suU8Qoa9tET-XCUDc_x+TkFrZuWMrhJQ@mail.gmail.com> (raw)
In-Reply-To: <20210724010117.GA633665@minyard.net>

Ho Corey,

On Sat, Jul 24, 2021 at 4:02 AM Corey Minyard <minyard@acm.org> wrote:
> 1) In struct xfrm_dst, what is the difference between the route and path
> fields?  From what I can tell, in the first element of a bundle they
> will both point the route the packet will take after it has been
> transformed.  In the other elements of a bundle, route is the same as in
> the first element and path will be NULL.  Is this really the intent?
> Can path just be eliminated?

For non-transport modes - such as tunnel - 'route' and 'path' won't be the
same in the first element (xdst0): 'route' will be the original dst and
'path' will be the route the transformed packet will take. the dst is
overridden in the xfrm_dst_lookup() call within xfrm_bundle_create(), after
xdst->route had been set.

AFAICT, the intent for the 'path' member is described in commit
0f6c480f23f4 ("xfrm: Move dst->path into struct xfrm_dst") - essentially
'path' contains the reference to the underlay route from the topmost bundle
member avoiding a walk through the child chain when needed.

Hope this helps.
Eyal.

  reply	other threads:[~2021-07-24  2:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24  1:01 IPSec questions and comments Corey Minyard
2021-07-24  2:40 ` Eyal Birger [this message]
     [not found] ` <91bce7da-163d-dee3-5309-ebcf27de1abb@gmail.com>
2021-07-24  6:15   ` question about configuring multiple interfaces on a host within the same ipv6 sub-net hui wang
2021-07-25  2:32     ` hui wang
2021-07-26  8:13 ` IPSec questions and comments Steffen Klassert

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=CAHsH6Gu12oTqeE_TV6suU8Qoa9tET-XCUDc_x+TkFrZuWMrhJQ@mail.gmail.com \
    --to=eyal.birger@gmail.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.