Skip to content

RFC vti6: prepare namespace and interfamily support.

Steffen Klassert netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest12 patches 3 repliesIn review
  2. v1 RFC12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Incorporated feedback from David and Nicolas.
- Codingstyle cleanups.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12xfrm: Introduce xfrm_input_afinfo to access the the callbacks properlyinclude/net/xfrm.h net/ipv4/xfrm4_policy.c net/ipv4/xfrm4_protocol.c +1 more+99 -130 replies
2/12xfrm6: Add IPsec protocol multiplexerinclude/net/xfrm.h net/ipv6/Makefile net/ipv6/xfrm6_policy.c +1 more+293 -10 replies
3/12esp6: Use the IPsec protocol multiplexer APInet/ipv6/esp6.c+16 -81 reply
4/12ah6: Use the IPsec protocol multiplexer APInet/ipv6/ah6.c+15 -71 reply
5/12ipcomp6: Use the IPsec protocol multiplexer APInet/ipv6/ipcomp6.c+15 -70 replies
6/12vti6: Remove dst_entry cachingnet/ipv6/ip6_vti.c+18 -240 replies
7/12vti6: Remove caching of flow informations.net/ipv6/ip6_vti.c+0 -310 replies
8/12vti6: Update the ipv6 side to use its own receive hook.net/ipv6/ip6_vti.c+149 -270 replies
9/12xfrm6: Remove xfrm_tunnel_notifierinclude/net/xfrm.h net/ipv6/xfrm6_mode_tunnel.c+0 -710 replies
10/12vti6: Support inter address family tunneling.net/ipv6/ip6_vti.c+34 -150 replies
11/12vti6: Check the tunnel endpoints of the xfrm state and the vti interfacenet/ipv6/ip6_vti.c+24 -10 replies
12/12vti6: Enable namespace changingnet/ipv6/ip6_vti.c+0 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH RFC v2 0/12] vti6: prepare namespace and interfamily support.

This patchset prepares vti6 for proper namespace and interfamily support.

With this patchset vti6 uses the new IPsec protocol multiplexer to register it's own receive side hooks for ESP, AH and IPCOMP exactly like the ipv4 side does that now.

Vti6 does the following on receive side:

1. Do an input policy check for the IPsec packet we received. This is required because this packet could be already processed by IPsec (tunnel in tunnel or a block policy is present), so an inbound policy check is needed.

2. Mark the packet with the i_key. The policy and the state must match this key now. Policy and state belong to the vti namespace and policy enforcement is done at the further layers.

3. Call the generic xfrm layer to do decryption and decapsulation.

4. Wait for a callback from the xfrm layer to do an inbound policy check on the vti policy, properly clean the skb to not leak informations on namespace transitions and to update the device statistics.

On transmit side:

1. Mark the packet with the o_key. The policy and the state must match this key now.

2. Do a xfrm_lookup on the original packet with the mark applied.

3. Check if we got an IPsec route.

4. Clean the skb to not leak informations on namespace transitions.

5. Attach the dst_enty we got from the xfrm_lookup to the skb.

6. Call dst_output to do the IPsec processing.

7. Do the device statistics.

Changes from v1:

- Incorporated feedback from David and Nicolas.
- Codingstyle cleanups.