MCPcopy Create free account
hub / github.com/F-Stack/f-stack / key_freesav

Function key_freesav

freebsd/netipsec/key.c:1343–1357  ·  view source on GitHub ↗

* Must be called after calling key_allocsa(). * This function is called by key_freesp() to free some SA allocated * for a policy. */

Source from the content-addressed store, hash-verified

1341 * for a policy.
1342 */
1343void
1344key_freesav(struct secasvar **psav)
1345{
1346 struct secasvar *sav = *psav;
1347
1348 IPSEC_ASSERT(sav != NULL, ("null sav"));
1349 if (SAV_DELREF(sav) == 0)
1350 return;
1351
1352 KEYDBG(IPSEC_STAMP,
1353 printf("%s: last reference to SA(%p)\n", __func__, sav));
1354
1355 *psav = NULL;
1356 key_delsav(sav);
1357}
1358
1359/*
1360 * Unlink SA from SAH and SPI hash under SAHTREE_WLOCK.

Callers 15

ipsec_common_inputFunction · 0.85
ipsec4_common_input_cbFunction · 0.85
ipsec_input.cFile · 0.85
udp_ipsec_inputFunction · 0.85
key_unlinksavFunction · 0.85
key_flush_sadFunction · 0.85
key_updateaddressesFunction · 0.85
key_updateFunction · 0.85
key_addFunction · 0.85
key_deleteFunction · 0.85
key_delete_allFunction · 0.85
key_delete_xformFunction · 0.85

Calls 2

key_delsavFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected