• Home
  • Raw
  • Download

Lines Matching refs:iph2

457 	struct ph2handle *iph2;  local
621 isakmp_info_send_d2(iph2) in isakmp_info_send_d2() argument
622 struct ph2handle *iph2; in isakmp_info_send_d2()
632 if (iph2->status != PHASE2ST_ESTABLISHED)
639 iph1 = getph1byaddr(iph2->src, iph2->dst, 0);
647 for (pr = iph2->approval->head; pr != NULL; pr = pr->next) {
834 isakmp_info_send_n2(iph2, type, data) in isakmp_info_send_n2() argument
835 struct ph2handle *iph2; in isakmp_info_send_n2()
839 struct ph1handle *iph1 = iph2->ph1;
846 if (!iph2->approval)
849 pr = iph2->approval->head;
873 iph2->flags |= ISAKMP_FLAG_E; /* XXX Should we do FLAG_A ? */
874 error = isakmp_info_send_common(iph1, payload, ISAKMP_NPTYPE_N, iph2->flags);
891 struct ph2handle *iph2 = NULL; local
900 iph2 = newph2();
901 if (iph2 == NULL)
904 iph2->dst = dupsaddr(iph1->remote);
905 if (iph2->dst == NULL) {
906 delph2(iph2);
909 iph2->src = dupsaddr(iph1->local);
910 if (iph2->src == NULL) {
911 delph2(iph2);
915 if (set_port(iph2->dst, 0) == NULL ||
916 set_port(iph2->src, 0) == NULL) {
919 delph2(iph2);
923 iph2->ph1 = iph1;
924 iph2->side = INITIATOR;
925 iph2->status = PHASE2ST_START;
926 iph2->msgid = isakmp_newmsgid2(iph1);
930 iph2->ivm = oakley_newiv2(iph1, iph2->msgid);
931 if (iph2->ivm == NULL) {
932 delph2(iph2);
937 hash = oakley_compute_hash1(iph2->ph1, iph2->msgid, payload);
939 delph2(iph2);
954 iph2->flags = (hash == NULL ? 0 : ISAKMP_FLAG_E);
956 iph2->flags = (hash == NULL ? 0 : ISAKMP_FLAG_A);
958 insph2(iph2);
959 bindph12(iph1, iph2);
964 iph2->sendbuf = vmalloc(tlen);
965 if (iph2->sendbuf == NULL) {
972 isakmp = (struct isakmp *)iph2->sendbuf->v;
978 isakmp->flags = iph2->flags;
979 memcpy(&isakmp->msgid, &iph2->msgid, sizeof(isakmp->msgid));
998 isakmp_printpacket(iph2->sendbuf, iph1->local, iph1->remote, 1);
1005 tmp = oakley_do_encrypt(iph2->ph1, iph2->sendbuf, iph2->ivm->ive,
1006 iph2->ivm->iv);
1007 VPTRINIT(iph2->sendbuf);
1010 iph2->sendbuf = tmp;
1014 if (isakmp_send(iph2->ph1, iph2->sendbuf) < 0) {
1015 VPTRINIT(iph2->sendbuf);
1029 VPTRINIT(iph2->sendbuf);
1038 unbindph12(iph2);
1039 remph2(iph2);
1040 delph2(iph2);
1137 struct ph2handle *iph2; local
1254 iph2 = getph2bysaidx(src, dst, proto, spi[i]);
1255 if(iph2 != NULL){
1256 delete_spd(iph2, created);
1257 unbindph12(iph2);
1258 remph2(iph2);
1259 delph2(iph2);
1292 struct ph2handle *iph2; local
1465 iph2 = getph2bysaidx(src, dst, proto_id, sa->sadb_sa_spi);
1466 if (iph2) {
1467 delete_spd(iph2, 0);
1468 unbindph12(iph2);
1469 remph2(iph2);
1470 delph2(iph2);