Messages in this thread | | | From | Eyal Birger <> | Date | Sat, 24 Jul 2021 05:40:50 +0300 | Subject | Re: 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.
| |