Home | History | Annotate | Download | only in racoon

Lines Matching refs:iph2

1122 	struct ph2handle *iph2 = NULL;
1141 iph2 = newph2();
1142 if (iph2 == NULL)
1145 iph2->dst = dupsaddr(iph1->remote);
1146 if (iph2->dst == NULL) {
1147 delph2(iph2);
1150 iph2->src = dupsaddr(iph1->local);
1151 if (iph2->src == NULL) {
1152 delph2(iph2);
1157 if (set_port(iph2->dst, 0) == NULL ||
1158 set_port(iph2->src, 0) == NULL) {
1161 delph2(iph2);
1165 iph2->ph1 = iph1;
1166 iph2->side = INITIATOR;
1167 iph2->status = PHASE2ST_START;
1170 iph2->msgid = isakmp_newmsgid2(iph1);
1172 iph2->msgid = iph1->msgid;
1177 if (isakmp_cfg_newiv(iph1, iph2->msgid) == NULL) {
1178 delph2(iph2);
1184 hash = oakley_compute_hash1(iph2->ph1, iph2->msgid, payload);
1186 delph2(iph2);
1201 iph2->flags = (hash == NULL ? 0 : ISAKMP_FLAG_E);
1203 iph2->flags = (hash == NULL ? 0 : ISAKMP_FLAG_A);
1205 insph2(iph2);
1206 bindph12(iph1, iph2);
1211 iph2->sendbuf = vmalloc(tlen);
1212 if (iph2->sendbuf == NULL) {
1219 isakmp = (struct isakmp *)iph2->sendbuf->v;
1225 isakmp->flags = iph2->flags;
1226 memcpy(&isakmp->msgid, &iph2->msgid, sizeof(isakmp->msgid));
1245 isakmp_printpacket(iph2->sendbuf, iph1->local, iph1->remote, 1);
1249 plogdump(LLV_DEBUG, iph2->sendbuf->v, iph2->sendbuf->l);
1255 tmp = oakley_do_encrypt(iph2->ph1, iph2->sendbuf,
1257 VPTRINIT(iph2->sendbuf);
1260 iph2->sendbuf = tmp;
1264 if (isakmp_send(iph2->ph1, iph2->sendbuf) < 0) {
1265 VPTRINIT(iph2->sendbuf);
1277 VPTRINIT(iph2->sendbuf);
1280 if (iph2->sendbuf != NULL)
1281 vfree(iph2->sendbuf);
1283 unbindph12(iph2);
1284 remph2(iph2);
1285 delph2(iph2);