HomeFreeBSD

Add the check that current VNET is ready and access to srchash is

Description

Add the check that current VNET is ready and access to srchash is
allowed.

ipsec_srcaddr() callback can be called during VNET teardown, since
ingress address checking subsystem isn't VNET specific. And thus
callback can make access to already freed memory. To prevent this,
use V_ipsec_idhtbl pointer as indicator of VNET readiness. And make
epoch_wait() after resetting it to NULL in vnet_ipsec_uninit() to
be sure that ipsec_srcaddr() is finished its work.

Reported by: kp
MFC after: 20 days

Details

Provenance
aeAuthored on
Parents
rS339645: sort {delete,check}-old* output
Branches
Unknown
Tags
Unknown