Lines Matching refs:assoc

775 	sadb_sa_t *assoc = (sadb_sa_t *)ksi->ks_in_extv[SADB_EXT_SA];
804 if (assoc->sadb_sa_flags & IPSA_F_INBOUND) {
808 if (assoc->sadb_sa_flags & IPSA_F_OUTBOUND)
811 if (assoc->sadb_sa_flags & IPSA_F_OUTBOUND) {
824 assoc->sadb_sa_flags |= IPSA_F_OUTBOUND;
835 assoc->sadb_sa_flags |= IPSA_F_INBOUND;
851 assoc->sadb_sa_flags |= IPSA_F_OUTBOUND;
855 assoc->sadb_sa_flags |= IPSA_F_INBOUND;
914 larval = ipsec_getassocbyspi(sq.inbound, sq.assoc->sadb_sa_spi,
1034 sadb_sa_t *assoc = (sadb_sa_t *)ksi->ks_in_extv[SADB_EXT_SA];
1073 if (assoc == NULL) {
1088 if ((assoc->sadb_sa_state != SADB_SASTATE_MATURE) &&
1089 (assoc->sadb_sa_state != SADB_X_SASTATE_ACTIVE_ELSEWHERE)) {
1093 if (assoc->sadb_sa_encrypt != SADB_EALG_NONE) {
1097 if (assoc->sadb_sa_flags & ~ahstack->ah_sadb.s_addflags) {
1127 aalg = ipss->ipsec_alglists[IPSEC_ALG_AUTH][assoc->sadb_sa_auth];
1131 assoc->sadb_sa_auth));
1167 sadb_sa_t *assoc = (sadb_sa_t *)ksi->ks_in_extv[SADB_EXT_SA];
1182 if ((assoc->sadb_sa_state != SADB_X_SASTATE_ACTIVE) ||
1202 sadb_sa_t *assoc = (sadb_sa_t *)ksi->ks_in_extv[SADB_EXT_SA];
1209 if (assoc == NULL) {
1544 * Caller has to REFRELE "assoc" which is passed in. This function has
1548 ah_set_usetime(ipsa_t *assoc, boolean_t inbound)
1555 netstack_t *ns = assoc->ipsa_netstack;
1559 if (!assoc->ipsa_haspeer) {
1560 sadb_set_usetime(assoc);
1565 * Otherwise, we want to grab both the original assoc and its peer.
1575 isv6 = (assoc->ipsa_addrfam == AF_INET6);
1580 ASSERT(assoc->ipsa_addrfam == AF_INET);
1583 inassoc = assoc;
1605 outassoc = assoc;
1643 * Caller must REFRELE the passed-in assoc. This function must REFRELE
1647 ah_age_bytes(ipsa_t *assoc, uint64_t bytes, boolean_t inbound)
1654 netstack_t *ns = assoc->ipsa_netstack;
1658 if (!assoc->ipsa_haspeer) {
1659 return (sadb_age_bytes(ahstack->ah_pfkey_q, assoc, bytes,
1664 * Otherwise, we want to grab both the original assoc and its peer.
1675 isv6 = (assoc->ipsa_addrfam == AF_INET6);
1680 ASSERT(assoc->ipsa_addrfam == AF_INET);
1683 inassoc = assoc;
1704 outassoc = assoc;
1902 sadb_sa_t *assoc;
2006 assoc = (sadb_sa_t *)ksi->ks_in_extv[SADB_EXT_SPIRANGE];
2007 assoc->sadb_sa_exttype = SADB_EXT_SA;
2008 assoc->sadb_sa_spi = newbie->ipsa_spi;
2009 *((uint64_t *)(&assoc->sadb_sa_replay)) = 0;
2040 ipsa_t *assoc;
2074 assoc = ipsec_getassocbyspi(isaf, ah->ah_spi,
2078 if (assoc == NULL) {
2096 IPSA_REFRELE(assoc);
2141 ipsa_t *assoc;
2183 assoc = ipsec_getassocbyspi(hptr, ah->ah_spi,
2187 if (assoc == NULL) {
2205 IPSA_REFRELE(assoc);
2548 ah_finish_up(ah_t *phdr_ah, ah_t *inbound_ah, ipsa_t *assoc,
2574 phdr_ah->ah_spi = assoc->ipsa_spi;
2577 htonl(atomic_inc_32_nv(&assoc->ipsa_replay));
2578 if (phdr_ah->ah_replay == 0 && assoc->ipsa_replay_wsize != 0) {
2587 assoc->ipsa_dstaddr, assoc->ipsa_addrfam,
2590 sadb_replay_delete(assoc);
2608 ASSERT(inbound_ah->ah_spi == assoc->ipsa_spi);
2635 ipsa_t *assoc = ira->ira_ipsec_ah_sa;
2664 assoc->ipsa_spi, addr, af, ahstack->ipsecah_netstack);
2866 size_t skip_len, uint32_t ah_offset, ipsa_t *assoc)
2871 uint_t icv_len = assoc->ipsa_mac_len;
2875 boolean_t force = (assoc->ipsa_flags & IPSA_F_ASYNC);
2916 IPSEC_CTX_TMPL(assoc, ipsa_authtmpl, IPSEC_ALG_AUTH, ctx_tmpl);
2919 kef_rc = crypto_mac_verify(&assoc->ipsa_amech,
2920 &ic->ic_crypto_data, &assoc->ipsa_kcfauthkey, ctx_tmpl,
2965 size_t skip_len, ipsa_t *assoc)
2970 uint_t icv_len = assoc->ipsa_mac_len;
2974 boolean_t force = (assoc->ipsa_flags & IPSA_F_ASYNC);
3015 kef_rc = crypto_mac(&assoc->ipsa_amech, &ic->ic_crypto_data,
3016 &assoc->ipsa_kcfauthkey, assoc->ipsa_authtmpl,
3051 ah_process_ip_options_v6(mblk_t *mp, ipsa_t *assoc, int *length_to_skip,
3145 assoc, ah_data_sz, ah_align_sz, ahstack)) {
3167 ah_process_ip_options_v4(mblk_t *mp, ipsa_t *assoc, int *length_to_skip,
3353 assoc, ah_data_sz, ah_align_sz, ahstack)) {
3383 ipsa_t *assoc;
3405 assoc = ixa->ixa_ipsec_ah_sa;
3406 ASSERT(assoc != NULL);
3412 if (is_system_labeled() && (assoc->ipsa_otsl != NULL)) {
3427 label_hold(assoc->ipsa_otsl);
3428 ip_xmit_attr_replace_tsl(ixa, assoc->ipsa_otsl);
3430 data_mp = sadb_whack_label(data_mp, assoc, ixa,
3446 ah_align_sz = P2ALIGN(assoc->ipsa_mac_len +
3452 ah_align_sz = P2ALIGN(assoc->ipsa_mac_len +
3458 if (!ah_age_bytes(assoc, age_bytes, B_FALSE)) {
3462 ntohl(assoc->ipsa_spi), assoc->ipsa_dstaddr, AF_INET,
3483 phdr_mp = ah_process_ip_options_v4(data_mp, assoc,
3484 &length_to_skip, assoc->ipsa_mac_len, B_TRUE, ahstack);
3486 phdr_mp = ah_process_ip_options_v6(data_mp, assoc,
3487 &length_to_skip, assoc->ipsa_mac_len, B_TRUE, ahstack);
3514 data_mp = ah_submit_req_outbound(data_mp, ixa, length_to_skip, assoc);
3524 ipsa_t *assoc = ira->ira_ipsec_ah_sa;
3533 ASSERT(assoc != NULL);
3546 if (!sadb_replay_peek(assoc, ah->ah_replay)) {
3593 phdr_mp = ah_process_ip_options_v4(data_mp, assoc,
3594 &length_to_skip, assoc->ipsa_mac_len, B_FALSE, ahstack);
3596 phdr_mp = ah_process_ip_options_v6(data_mp, assoc,
3597 &length_to_skip, assoc->ipsa_mac_len, B_FALSE, ahstack);
3617 assoc));
3640 ipsa_t *assoc;
3647 assoc = ira->ira_ipsec_ah_sa;
3668 ah_set_usetime(assoc, B_TRUE);
3695 if (!sadb_replay_check(assoc, ah->ah_replay)) {
3718 assoc->ipsa_spi, addr, af, ahstack->ipsecah_netstack);
3737 if (!ah_age_bytes(assoc, length, B_TRUE)) {
3742 assoc->ipsa_spi, assoc->ipsa_dstaddr,
3767 if (!ah_age_bytes(assoc, length + sizeof (ip6_t), B_TRUE)) {
3772 "expire.\n", assoc->ipsa_spi, &ip6h->ip6_dst,
3832 if (is_system_labeled() && (assoc->ipsa_tsl != NULL)) {
3833 if (!ip_recv_attr_replace_label(ira, assoc->ipsa_tsl)) {
3841 if (assoc->ipsa_state == IPSA_STATE_IDLE) {
3846 sadb_buf_pkt(assoc, mp, ira);