HomeFreeBSD

Change some IPsec structures.

Description

Change some IPsec structures.

Change struct secashead. Replace chain LIST with TAILQ and add two new
LIST entries. addrhash will be used for lookup in hash by secasindex.
drainq will be used by flush callout.
Remove savtree field. Instead two TAILQ will be used. One to keep LARVAL
SAs, another to keep alive (MATURE and DYING) SAs. Also add refcnt field.

Change struct secasvar. Use TAILQ instead of LIST to keep SAs in a chain.
Add spihash field for lookups by SPI. drainq field will be used by flush
callout. Replace CURRENT lifetime expiring counters with PCPU counters
to avoid locking for updates.

Add two hash entries to struct secacq.

Get rid of tdb_ident and tdb_crypto structures. Instead add two new
structures xform_history and xform_data.

struct xform_history will be used to store in the mbuf tag information
about used SA. It contains all needed info to check that INBOUND security
policy was fully applied to decrypted packet. In case of SA bundle,
resulting mbuf will have several mbuf tags with such structures.

struct xform_data will be used by crypto callbacks to store and obtain
needed information before and after crypto processing.

Change prototype of xform output callback. Now it will take as arguments
referenced security policy, referenced security association and current
transform's index.

Details

Provenance
aeAuthored on
Parents
rS308837: Don't panic if it's not a TI chip, this code can be called when it is not.
Branches
Unknown
Tags
Unknown