Home
last modified time | relevance | path

Searched refs:iph2 (Results 1 – 16 of 16) sorted by relevance

/netbsd/src/crypto/dist/ipsec-tools/src/racoon/
Disakmp_quick.c113 quick_timeover(struct ph2handle *iph2) in quick_timeover() argument
117 saddrwop2str(iph2->dst)); in quick_timeover()
120 if (iph2->side == INITIATOR) in quick_timeover()
121 pk_sendeacquire(iph2); in quick_timeover()
123 remph2(iph2); in quick_timeover()
124 delph2(iph2); in quick_timeover()
135 quick_i1prep(struct ph2handle *iph2, vchar_t *msg __unused) /* must be null pointer */ in quick_i1prep() argument
140 if (iph2->status != PHASE2ST_STATUS2) { in quick_i1prep()
142 "status mismatched %d.\n", iph2->status); in quick_i1prep()
146 iph2->msgid = isakmp_newmsgid2(iph2->ph1); in quick_i1prep()
[all …]
Dhandler.c642 struct ph2handle *iph2; in getph2bysaidx() local
645 LIST_FOREACH(iph2, &ph2tree, chain) { in getph2bysaidx()
646 if (iph2->proposal == NULL && iph2->approval == NULL) in getph2bysaidx()
648 if (iph2->approval != NULL) { in getph2bysaidx()
649 for (pr = iph2->approval->head; pr != NULL; in getph2bysaidx()
654 return iph2; in getph2bysaidx()
656 } else if (iph2->proposal != NULL) { in getph2bysaidx()
657 for (pr = iph2->proposal->head; pr != NULL; in getph2bysaidx()
662 return iph2; in getph2bysaidx()
676 struct ph2handle *iph2 = NULL; in newph2() local
[all …]
Disakmp.c653 struct ph2handle *iph2; in isakmp_main() local
688 iph2 = getph2bymsgid(iph1, msgid); in isakmp_main()
689 if (iph2 == NULL) { in isakmp_main()
705 iph2->flags |= ISAKMP_FLAG_C; in isakmp_main()
708 if (quick_main(iph2, msg) < 0) { in isakmp_main()
711 remph2(iph2); in isakmp_main()
712 delph2(iph2); in isakmp_main()
958 quick_main(struct ph2handle *iph2, vchar_t *msg) in quick_main() argument
967 if (iph2->status == PHASE2ST_ESTABLISHED in quick_main()
968 || iph2->status == PHASE2ST_GETSPISENT) in quick_main()
[all …]
Dpfkey.c873 pk_sendgetspi(struct ph2handle *iph2) in pk_sendgetspi() argument
883 if (iph2->side == INITIATOR) in pk_sendgetspi()
884 pp = iph2->proposal; in pk_sendgetspi()
886 pp = iph2->approval; in pk_sendgetspi()
888 if (iph2->sa_src && iph2->sa_dst) { in pk_sendgetspi()
890 src = dupsaddr(iph2->sa_src); in pk_sendgetspi()
891 dst = dupsaddr(iph2->sa_dst); in pk_sendgetspi()
894 src = dupsaddr(iph2->src); in pk_sendgetspi()
895 dst = dupsaddr(iph2->dst); in pk_sendgetspi()
936 natt_type = iph2->ph1->natt_options->encaps_type; in pk_sendgetspi()
[all …]
Dadmin.c488 struct ph2handle *iph2; in admin_process() local
516 iph2 = getph2byid(src, dst, sp_out->id); in admin_process()
517 if (iph2 != NULL) { in admin_process()
518 event_list = &iph2->evt_listeners; in admin_process()
519 if (iph2->status == PHASE2ST_ESTABLISHED) in admin_process()
549 iph2 = newph2(); in admin_process()
550 if (iph2 == NULL) { in admin_process()
555 iph2->side = INITIATOR; in admin_process()
556 iph2->satype = admin2pfkey_proto(com->ac_proto); in admin_process()
557 iph2->spid = sp_out->id; in admin_process()
[all …]
Disakmp_inf.c606 isakmp_info_send_d2( struct ph2handle *iph2) in isakmp_info_send_d2() argument
616 if (iph2->status != PHASE2ST_ESTABLISHED) in isakmp_info_send_d2()
623 iph1 = getph1byaddr(iph2->src, iph2->dst, 0); in isakmp_info_send_d2()
631 for (pr = iph2->approval->head; pr != NULL; pr = pr->next) { in isakmp_info_send_d2()
803 isakmp_info_send_n2(struct ph2handle *iph2, int type, vchar_t *data) in isakmp_info_send_n2() argument
805 struct ph1handle *iph1 = iph2->ph1; in isakmp_info_send_n2()
812 if (!iph2->approval) in isakmp_info_send_n2()
815 pr = iph2->approval->head; in isakmp_info_send_n2()
839 iph2->flags |= ISAKMP_FLAG_E; /* XXX Should we do FLAG_A ? */ in isakmp_info_send_n2()
840 error = isakmp_info_send_common(iph1, payload, ISAKMP_NPTYPE_N, iph2->flags); in isakmp_info_send_n2()
[all …]
Disakmp_cfg.c1118 struct ph2handle *iph2 = NULL; in isakmp_cfg_send() local
1137 iph2 = newph2(); in isakmp_cfg_send()
1138 if (iph2 == NULL) in isakmp_cfg_send()
1141 iph2->dst = dupsaddr(iph1->remote); in isakmp_cfg_send()
1142 if (iph2->dst == NULL) { in isakmp_cfg_send()
1143 delph2(iph2); in isakmp_cfg_send()
1146 iph2->src = dupsaddr(iph1->local); in isakmp_cfg_send()
1147 if (iph2->src == NULL) { in isakmp_cfg_send()
1148 delph2(iph2); in isakmp_cfg_send()
1152 iph2->side = INITIATOR; in isakmp_cfg_send()
[all …]
Dproposal.c1002 set_proposal_from_policy(struct ph2handle *iph2, in set_proposal_from_policy() argument
1017 newpp->lifetime = iph2->sainfo->lifetime; in set_proposal_from_policy()
1018 newpp->lifebyte = iph2->sainfo->lifebyte; in set_proposal_from_policy()
1019 newpp->pfs_group = iph2->sainfo->pfs_group; in set_proposal_from_policy()
1034 if (iph2->ph1 && (iph2->ph1->natt_flags & NAT_DETECTED)) in set_proposal_from_policy()
1035 encmodesv += iph2->ph1->natt_options->mode_udp_diff; in set_proposal_from_policy()
1067 if (iph2->ph1 && (iph2->ph1->natt_flags & NAT_DETECTED)) in set_proposal_from_policy()
1069 iph2->ph1->natt_options->mode_udp_diff; in set_proposal_from_policy()
1075 if (iph2->side == INITIATOR) in set_proposal_from_policy()
1080 if (set_satrnsbysainfo(newpr, iph2->sainfo) < 0) { in set_proposal_from_policy()
[all …]
Dipsec_doi.c732 ipsecdoi_selectph2proposal(struct ph2handle *iph2) in ipsecdoi_selectph2proposal() argument
739 pair = get_proppair_and_doi_sit(iph2->sa, IPSECDOI_TYPE_PH2, in ipsecdoi_selectph2proposal()
745 ret = get_ph2approval(iph2, pair); in ipsecdoi_selectph2proposal()
752 iph2->sa_ret = get_sabyproppair(doitype, sittype, ret); in ipsecdoi_selectph2proposal()
754 if (iph2->sa_ret == NULL) in ipsecdoi_selectph2proposal()
768 ipsecdoi_checkph2proposal(struct ph2handle *iph2) in ipsecdoi_checkph2proposal() argument
778 spair = get_proppair_and_doi_sit(iph2->sa, IPSECDOI_TYPE_PH2, in ipsecdoi_checkph2proposal()
789 rpair = get_proppair(iph2->sa_ret, IPSECDOI_TYPE_PH2); in ipsecdoi_checkph2proposal()
839 p = get_ph2approval(iph2, rpair); in ipsecdoi_checkph2proposal()
844 sa_ret = iph2->sa_ret; in ipsecdoi_checkph2proposal()
[all …]
Dsecurity.c164 set_secctx_in_proposal(iph2, spidx) in set_secctx_in_proposal() argument
165 struct ph2handle *iph2; in set_secctx_in_proposal()
168 iph2->proposal->sctx.ctx_doi = spidx.sec_ctx.ctx_doi;
169 iph2->proposal->sctx.ctx_alg = spidx.sec_ctx.ctx_alg;
170 iph2->proposal->sctx.ctx_strlen = spidx.sec_ctx.ctx_strlen;
171 memcpy(iph2->proposal->sctx.ctx_str, spidx.sec_ctx.ctx_str,
Dpolicy.c106 getsp_r(spidx, iph2) in getsp_r() argument
108 struct ph2handle *iph2;
139 saddr2str(iph2->src));
143 if (cmpsaddr(iph2->src, (struct sockaddr *) &spidx->src) != CMPSADDR_MATCH ||
148 saddr2str(iph2->dst));
152 if (cmpsaddr(iph2->dst, (struct sockaddr *) &spidx->dst) != CMPSADDR_MATCH ||
Doakley.c469 oakley_compute_keymat(struct ph2handle *iph2, int side) in oakley_compute_keymat() argument
474 if (iph2->approval->pfs_group && iph2->dhpub_p) { in oakley_compute_keymat()
475 if (oakley_dh_compute(iph2->pfsgrp, iph2->dhpub, in oakley_compute_keymat()
476 iph2->dhpriv, iph2->dhpub_p, &iph2->dhgxy) < 0) in oakley_compute_keymat()
481 if (oakley_compute_keymat_x(iph2, side, INBOUND_SA) < 0 in oakley_compute_keymat()
482 || oakley_compute_keymat_x(iph2, side, OUTBOUND_SA) < 0) in oakley_compute_keymat()
503 oakley_compute_keymat_x(struct ph2handle *iph2, int side, int sa_dir) in oakley_compute_keymat_x() argument
515 pfs = ((iph2->approval->pfs_group && iph2->dhgxy) ? 1 : 0); in oakley_compute_keymat_x()
517 len = pfs ? iph2->dhgxy->l : 0; in oakley_compute_keymat_x()
520 + iph2->nonce->l in oakley_compute_keymat_x()
[all …]
Dipsec_doi.h222 extern int ipsecdoi_updatespi(struct ph2handle *iph2);
Dracoonctl.c1101 struct ph2handle *iph2; in dump_internal() local
1124 iph2 = (struct ph2handle *)buf; in dump_internal()
1125 addr = (struct sockaddr *)(++iph2); in dump_internal()
Dhandler.h497 int (* enum_func)(struct ph2handle *iph2, void *arg), void *enum_arg);
/netbsd/src/crypto/dist/ipsec-tools/
DChangeLog.old27 * src/racoon/isakmp_quick.c: Fixed iph2->id / id_p checks in
1026 * src/racoon/isakmp_inf.c: use iph2->generated_spidx to check if
1028 * src/racoon/isakmp_quick.c: sets iph2->generated_spidx for