Lines Matching refs:sah
173 utun_ipsec_set_sah (struct secashead **sah,
203 // TODO: add sah and policy (collision) check and prevention. ensure that there is no conflicting policy.
205 *sah = key_newsah2(&saidx, dir);
211 utun_ipsec_clr_sahs (struct secashead **sah)
219 for (sav = LIST_FIRST(&(*sah)->savtree[state]);
243 key_delsah(*sah);
295 utun_ipsec_alloc_sav (struct secashead *sah,
335 if ((*sav = key_newsav2(sah,
384 utun_ipsec_num_savs (struct secashead **sah)
393 for (sav = LIST_FIRST(&(*sah)->savtree[state]);
423 struct secashead *sah;
445 sah = IF_UTUN_GET_CRYPTO_KEYS_IPSEC_SAH(crypto_keys);
446 if (!sah) {
460 sah = IF_UTUN_GET_CRYPTO_KEYS_IPSEC_SAH(crypto_keys);
461 if (!sah) {
474 if ((err = utun_ipsec_alloc_sav(sah,
494 crypto_keys->state.u.ipsec.proto = sah->saidx.proto;
495 crypto_keys->state.u.ipsec.mode = sah->saidx.mode;
496 if (((struct sockaddr *)&sah->saidx.src)->sa_family == AF_INET) {
521 // release sah
762 // grab sadb_mutex, to update sah's route cache and get a local copy of it
764 ro = &sav->sah->sa_route;
796 // release sadb_mutex, after updating sah's route cache and getting a local copy
858 // grab sadb_mutex, before updating sah's route cache
860 ro = &sav->sah->sa_route;
893 // release sadb_mutex, after updating sah's route cache and getting a local copy