IPSec questions and comments
Subsystems (2)
<[email protected]>, "David S. Miller" <[email protected]>
Cc: [email protected], [email protected] Bcc:
Subject: IPSec questions
Reply-To: [email protected]
I've been going through the XFRM code trying to understand it. I've been documenting things in the code as I go.
I have a specific usage question, then a general question:
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?
2) This code is really hard to understand. Nobody should have to go through what I'm going through. If I can convince my employer to allow me to submit the comments I'm adding, would that be something acceptable? It would obviously take a lot of time to review. If nobody's going to have the time to review it, I don't need to put forth the extra effort to make it submittable.
Thanks,
-corey
Ho Corey,
Quoted 6 lines · Corey Minyard
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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
question about configuring multiple interfaces on a host within the same ipv6 sub-net
Hi All
I have an host (running centos8), it has multiple interfaces connecting to the same IPv6 sub-net. Different IPv6 addresses are statically assigned to these interfaces. All these interfaces are assigned with the same gateway address.
I'd like to config the routing policy so that:
All packets with source IP address specified goes out via the interface where the source IP address was assigned to.
When source IP address is not specified by application. (ex. TCP sync packet), different interfaces' IP address is picked (as source IP address) randomly (if the destination IP address is different).
How do I config routing policy to achieve these in such an environment.
Please let me know if there are more appropriate mail lists for my question.
Thanks,
Hui
Re: question about configuring multiple interfaces on a host within the same ipv6 sub-net
Quoted 8 lines · hui wang
Hi All
I have an host (running centos8), it has multiple interfaces connecting to the same IPv6 sub-net. Different IPv6 addresses are statically assigned to these interfaces. All these interfaces are assigned with the same gateway address.
I'd like to config the routing policy so that:
All packets with source IP address specified goes out via the interface where the source IP address was assigned to. When source IP address is not specified by application. (ex. TCP sync packet)
when connect() called without binding to an ip address
Quoted 10 lines
, different interfaces' IP address is picked (as source IP address) randomly (if the destination IP address is different).
How do I config routing policy to achieve these in such an environment.
Please let me know if there are more appropriate mail lists for my question.
Thanks,
Hui
Quoted 9 lines · Corey Minyard
<[email protected]>, "David S. Miller" <[email protected]>
Cc: [email protected], [email protected] Bcc:
Subject: IPSec questions
Reply-To: [email protected]I've been going through the XFRM code trying to understand it. I've been documenting things in the code as I go.
Quoted 8 lines
I have a specific usage question, then a general question:
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?
Eyal gave a good explanation of this.
Quoted 7 lines
2) This code is really hard to understand. Nobody should have to go through what I'm going through. If I can convince my employer to allow me to submit the comments I'm adding, would that be something acceptable? It would obviously take a lot of time to review. If nobody's going to have the time to review it, I don't need to put forth the extra effort to make it submittable.
Documentation is always welcome. If you submit your documentation in small reviewable patches, then it should be accepted and merged over time.