• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/iputils/racoon/

Lines Matching refs:iph2

239 isakmp_info_send_d2(iph2)
240 struct ph2handle *iph2;
250 if (iph2->status != PHASE2ST_ESTABLISHED)
257 iph1 = getph1byaddr(iph2->src, iph2->dst);
262 for (pr = iph2->approval->head; pr != NULL; pr = pr->next) {
431 isakmp_info_send_n2(iph2, type, data)
432 struct ph2handle *iph2;
436 struct ph1handle *iph1 = iph2->ph1;
443 if (!iph2->approval)
446 pr = iph2->approval->head;
469 iph2->flags |= ISAKMP_FLAG_E;
470 error = isakmp_info_send_common(iph1, payload, ISAKMP_NPTYPE_N, iph2->flags);
487 struct ph2handle *iph2 = NULL;
496 iph2 = newph2();
497 if (iph2 == NULL)
500 iph2->dst = dupsaddr(iph1->remote);
501 iph2->src = dupsaddr(iph1->local);
504 ((struct sockaddr_in *)iph2->dst)->sin_port = 0;
505 ((struct sockaddr_in *)iph2->src)->sin_port = 0;
509 ((struct sockaddr_in6 *)iph2->dst)->sin6_port = 0;
510 ((struct sockaddr_in6 *)iph2->src)->sin6_port = 0;
516 delph2(iph2);
519 iph2->ph1 = iph1;
520 iph2->side = INITIATOR;
521 iph2->status = PHASE2ST_START;
522 iph2->msgid = isakmp_newmsgid2(iph1);
526 iph2->ivm = oakley_newiv2(iph1, iph2->msgid);
527 if (iph2->ivm == NULL) {
528 delph2(iph2);
533 hash = oakley_compute_hash1(iph2->ph1, iph2->msgid, payload);
535 delph2(iph2);
550 iph2->flags = (hash == NULL ? 0 : ISAKMP_FLAG_E);
552 iph2->flags = (hash == NULL ? 0 : ISAKMP_FLAG_A);
554 insph2(iph2);
555 bindph12(iph1, iph2);
560 iph2->sendbuf = vmalloc(tlen);
561 if (iph2->sendbuf == NULL) {
568 isakmp = (struct isakmp *)iph2->sendbuf->v;
574 isakmp->flags = iph2->flags;
575 memcpy(&isakmp->msgid, &iph2->msgid, sizeof(isakmp->msgid));
594 isakmp_printpacket(iph2->sendbuf, iph1->local, iph1->remote, 1);
601 tmp = oakley_do_encrypt(iph2->ph1, iph2->sendbuf, iph2->ivm->ive,
602 iph2->ivm->iv);
604 vfree(iph2->sendbuf);
605 iph2->sendbuf = NULL;
608 vfree(iph2->sendbuf);
609 iph2->sendbuf = tmp;
613 if (isakmp_send(iph2->ph1, iph2->sendbuf) < 0) {
614 vfree(iph2->sendbuf);
615 iph2->sendbuf = NULL;
628 vfree(iph2->sendbuf);
629 iph2->sendbuf = NULL;
638 unbindph12(iph2);
639 remph2(iph2);
640 delph2(iph2);
743 struct ph2handle *iph2;
751 iph2 = getph2bymsgid(iph1, msgid);
752 if (iph2 == NULL) {
758 unbindph12(iph2);
759 remph2(iph2);
760 delph2(iph2);
823 struct ph2handle *iph2;
893 iph2 = getph2bysaidx(src, dst, proto, spi[i]);
894 if (iph2) {
895 unbindph12(iph2);
896 remph2(iph2);
897 delph2(iph2);
930 struct ph2handle *iph2;
1024 iph2 = getph2bysaidx(src, dst, proto_id, sa->sadb_sa_spi);
1025 if (iph2) {
1026 unbindph12(iph2);
1027 remph2(iph2);
1028 delph2(iph2);