netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 net-next 0/5] xfrm: Add ESN support for AH
@ 2014-01-14  1:39 Fan Du
  2014-01-14  1:39 ` [PATCHv3 net-next 1/5] {IPv4,xfrm} Add ESN support for AH egress part Fan Du
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Fan Du @ 2014-01-14  1:39 UTC (permalink / raw)
  To: steffen.klassert; +Cc: davem, netdev

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.

Fan Du (5):
  {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

 net/ipv4/ah4.c       |   50 +++++++++++++++++++++++++++++++++++++++++-------
 net/ipv6/ah6.c       |   52 +++++++++++++++++++++++++++++++++++++++++++-------
 net/xfrm/xfrm_user.c |    3 ++-
 3 files changed, 90 insertions(+), 15 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-01-15  7:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14  1:39 [PATCHv3 net-next 0/5] xfrm: Add ESN support for AH Fan Du
2014-01-14  1:39 ` [PATCHv3 net-next 1/5] {IPv4,xfrm} Add ESN support for AH egress part Fan Du
2014-01-14  1:39 ` [PATCHv3 net-next 2/5] {IPv4,xfrm} Add ESN support for AH ingress part Fan Du
2014-01-14  9:54   ` Steffen Klassert
2014-01-14 10:01     ` Fan Du
2014-01-14 10:09       ` Steffen Klassert
2014-01-14 10:17         ` Fan Du
2014-01-14 10:34           ` Steffen Klassert
2014-01-14 10:41             ` Fan Du
2014-01-14 10:51               ` Steffen Klassert
2014-01-15  7:12             ` Fan Du
2014-01-14  1:39 ` [PATCHv3 net-next 3/5] {IPv6,xfrm} Add ESN support for AH egress part Fan Du
2014-01-14  1:39 ` [PATCHv3 net-next 4/5] {IPv6,xfrm} Add ESN support for AH ingress part Fan Du
2014-01-14  1:39 ` [PATCHv3 net-next 5/5] xfrm: Don't prohibit AH from using ESN feature Fan Du

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).