lkml.org 
[lkml]   [2021]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: IPSec questions and comments
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.

\
 
 \ /
  Last update: 2021-07-24 04:42    [W:0.070 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site