freebsd-dev/sys/netipsec
John Baldwin fd40ecf3d4 Set the proper vnet in IPsec callback functions.
When using hardware crypto engines, the callback functions used to handle
an IPsec packet after it has been encrypted or decrypted can be invoked
asynchronously from a worker thread that is not associated with a vnet.
Extend 'struct xform_data' to include a vnet pointer and save the current
vnet in this new member when queueing crypto requests in IPsec.  In the
IPsec callback routines, use the new member to set the current vnet while
processing the modified packet.

This fixes a panic when using hardware offload such as ccr(4) with IPsec
after VIMAGE was enabled in GENERIC.

Reported by:	Sony Arpita Das and Harsh Jain @ Chelsio
Reviewed by:	bz
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D14763
2018-03-20 17:05:23 +00:00
..
ah_var.h
ah.h
esp_var.h
esp.h
ipcomp_var.h
ipcomp.h
ipsec6.h
ipsec_input.c
ipsec_mbuf.c
ipsec_mod.c
ipsec_output.c
ipsec_pcb.c
ipsec_support.h
ipsec.c
ipsec.h
key_debug.c
key_debug.h
key_var.h
key.c
key.h
keydb.h
keysock.c Rework key_sendup_mbuf() a bit: 2018-03-11 19:14:01 +00:00
keysock.h
subr_ipsec.c
udpencap.c
xform_ah.c Set the proper vnet in IPsec callback functions. 2018-03-20 17:05:23 +00:00
xform_esp.c Set the proper vnet in IPsec callback functions. 2018-03-20 17:05:23 +00:00
xform_ipcomp.c Set the proper vnet in IPsec callback functions. 2018-03-20 17:05:23 +00:00
xform_tcp.c
xform.h Set the proper vnet in IPsec callback functions. 2018-03-20 17:05:23 +00:00