]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: add espintcp (RFC 8229)
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 25 Nov 2019 13:49:02 +0000 (14:49 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 9 Dec 2019 08:59:07 +0000 (09:59 +0100)
commita601325e92f9663e40f80285f341218aab2b207e
treec5d84ce22c0cdd452fea7478ca8d63b37188b6b6
parenta254da1ebe9a74701b84bd78d455abe26cf58dac
xfrm: add espintcp (RFC 8229)

TCP encapsulation of IKE and IPsec messages (RFC 8229) is implemented
as a TCP ULP, overriding in particular the sendmsg and recvmsg
operations. A Stream Parser is used to extract messages out of the TCP
stream using the first 2 bytes as length marker. Received IKE messages
are put on "ike_queue", waiting to be dequeued by the custom recvmsg
implementation. Received ESP messages are sent to XFRM, like with UDP
encapsulation.

Some of this code is taken from the original submission by Herbert
Xu. Currently, only IPv4 is supported, like for UDP encapsulation.

Co-developed-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/espintcp.h [new file with mode: 0644]
include/net/xfrm.h
include/uapi/linux/udp.h
net/ipv4/Kconfig
net/ipv4/esp4.c
net/xfrm/Makefile
net/xfrm/espintcp.c [new file with mode: 0644]
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c