Skip to content

xfrm: Add ESN support for AH

Fan Du netdev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 1 replyIn review
  2. v46 patches 1 replySuperseded
  3. v35 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v25 patches1 replySuperseded
v13 patches2 repliesSuperseded

Changes in v5 from the cover letter

- Before calling type 'input' method, XFRM_SKB_CB(skb)->seq.input.hi has already been set in network byte order in xfrm_input, so no need to change the byte once in type 'input' method. So fix Patch3/6 and Patch5/6.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6skbuff: Introduce skb_to_sgvec_nomark to map skb without mark new endinclude/linux/skbuff.h net/core/skbuff.c+28 -00 replies
2/6{IPv4,xfrm} Add ESN support for AH egress partnet/ipv4/ah4.c+20 -60 replies
3/6{IPv4,xfrm} Add ESN support for AH ingress partnet/ipv4/ah4.c+22 -50 replies
4/6{IPv6,xfrm} Add ESN support for AH egress partnet/ipv6/ah6.c+21 -50 replies
5/6{IPv6,xfrm} Add ESN support for AH ingress partnet/ipv6/ah6.c+24 -60 replies
6/6xfrm: Don't prohibit AH from using ESN featurenet/xfrm/xfrm_user.c+2 -10 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCHv5 net-next 0/6] xfrm: Add ESN support for AH

Hi,

This is initial Extended Sequence Number support for AH based on IPv4/6. The rationale is totally by the RFC 4302, which states:

3.3.3.2.2. Implicit Packet Padding and ESN

If the ESN option is elected for an SA, then the high-order 32 bits of the ESN must be included in the ICV computation. For purposes of ICV computation, these bits are appended (implicitly) immediately after the end of the payload, and before any implicit packet padding.

So we attach the high-order 32bits as a scatterlist right after the packet payload to compute ICV value.

Test:
I add a knob in iproute2/ip/xfrm_state.c to enable esn when setting SA, which make it possible to test with-esn and without-esn scenarios, both cases works ok with ping using packetsize(-s) from default to 32768.

v2:
- Patch3/5 and Patch4/5 add IPv6 part as requested by Steffen.
- Patch5/5 restrict ESN feature only to ESP and AH.
v3:
- Fix double parens spotted by Sergei, and thanks for reporting.
v4:
- Incorperate feedbacks from Steffen by simplify the code flow.
- Add Patch1/6 to introduce skb_to_sgvec_nomark
- Patch2/6 remove rebundant inclusion crypto/scatterwalk.h
v5:
- Before calling type 'input' method, XFRM_SKB_CB(skb)->seq.input.hi has already been set in network byte order in xfrm_input, so no need to change the byte once in type 'input' method. So fix Patch3/6 and Patch5/6.

Fan Du (6):
skbuff: Introduce skb_to_sgvec_nomark to map skb without mark new end {IPv4,xfrm} Add ESN support for AH egress part
{IPv4,xfrm} Add ESN support for AH ingress part {IPv6,xfrm} Add ESN support for AH egress part
{IPv6,xfrm} Add ESN support for AH ingress part
xfrm: Don't prohibit AH from using ESN feature

 include/linux/skbuff.h |    2 ++
 net/core/skbuff.c      |   26 ++++++++++++++++++++++
 net/ipv4/ah4.c         |   53 +++++++++++++++++++++++++++++++++++----------
 net/ipv6/ah6.c         |   56 ++++++++++++++++++++++++++++++++++++++----------
 net/xfrm/xfrm_user.c   |    3 ++-
 5 files changed, 117 insertions(+), 23 deletions(-)
Signature · 1 line
1.7.9.5