Thread (3 messages) flat view 3 messages, 3 authors, 2021-07-26

Re: IPSec questions and comments

From: Eyal Birger <hidden>
Date: 2021-07-24 02:41:24
Also in: lkml

Ho Corey,

On Sat, Jul 24, 2021 at 4:02 AM Corey Minyard [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help