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

Lines Matching refs:iph2

472 		struct ph2handle *iph2;
495 iph2 = getph2bymsgid(iph1, msgid);
496 if (iph2 == NULL) {
506 iph2->flags |= ISAKMP_FLAG_C;
509 if (quick_main(iph2, msg) < 0) {
512 unbindph12(iph2);
513 remph2(iph2);
514 delph2(iph2);
648 quick_main(iph2, msg)
649 struct ph2handle *iph2;
659 if (iph2->status == PHASE2ST_ESTABLISHED
660 || iph2->status == PHASE2ST_GETSPISENT)
669 [iph2->side]
670 [iph2->status] == NULL) {
671 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
676 [iph2->side]
677 [iph2->status])(iph2, msg);
679 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
683 isakmp_info_send_n1(iph2->ph1, error, NULL);
688 if (iph2->status == PHASE2ST_ADDSA)
692 if (iph2->sendbuf == NULL) {
697 vfree(iph2->sendbuf);
698 iph2->sendbuf = NULL;
701 if (iph2->scr)
702 SCHED_KILL(iph2->scr);
707 [iph2->side]
708 [iph2->status])(iph2, msg) != 0) {
709 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
718 s_isakmp_state(ISAKMP_ETYPE_QUICK, iph2->side, iph2->status),
900 isakmp_ph2begin_i(iph1, iph2)
902 struct ph2handle *iph2;
909 a = strdup(saddr2str(iph2->src));
912 a, saddr2str(iph2->dst));
917 gettimeofday(&iph2->start, NULL);
920 bindph12(iph1, iph2);
921 iph2->status = PHASE2ST_STATUS2;
924 [iph2->side]
925 [iph2->status])(iph2, NULL) < 0) {
926 unbindph12(iph2);
928 remph2(iph2);
929 delph2(iph2);
942 struct ph2handle *iph2 = 0;
948 iph2 = newph2();
949 if (iph2 == NULL) {
955 iph2->ph1 = iph1;
956 iph2->side = RESPONDER;
957 iph2->status = PHASE2ST_START;
958 iph2->flags = isakmp->flags;
959 iph2->msgid = isakmp->msgid;
960 iph2->seq = pk_getseq();
961 iph2->ivm = oakley_newiv2(iph1, iph2->msgid);
962 if (iph2->ivm == NULL) {
963 delph2(iph2);
966 iph2->dst = dupsaddr(iph1->remote);
967 if (iph2->dst == NULL) {
968 delph2(iph2);
971 switch (iph2->dst->sa_family) {
973 ((struct sockaddr_in *)iph2->dst)->sin_port = 0;
977 ((struct sockaddr_in6 *)iph2->dst)->sin6_port = 0;
982 "invalid family: %d\n", iph2->dst->sa_family);
983 delph2(iph2);
987 iph2->src = dupsaddr(iph1->local);
988 if (iph2->src == NULL) {
989 delph2(iph2);
992 switch (iph2->src->sa_family) {
994 ((struct sockaddr_in *)iph2->src)->sin_port = 0;
998 ((struct sockaddr_in6 *)iph2->src)->sin6_port = 0;
1003 "invalid family: %d\n", iph2->src->sa_family);
1004 delph2(iph2);
1009 insph2(iph2);
1010 bindph12(iph1, iph2);
1016 a = strdup(saddr2str(iph2->src));
1019 a, saddr2str(iph2->dst));
1028 [iph2->side]
1029 [iph2->status])(iph2, msg);
1034 isakmp_info_send_n1(iph2->ph1, error, NULL);
1039 unbindph12(iph2);
1040 remph2(iph2);
1041 delph2(iph2);
1048 [iph2->side]
1049 [iph2->status])(iph2, msg) < 0) {
1050 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
1059 s_isakmp_state(ISAKMP_ETYPE_QUICK, iph2->side, iph2->status),
1448 isakmp_ph2resend(iph2)
1449 struct ph2handle *iph2;
1451 if (iph2->retry_counter < 0) {
1454 isakmp_pindex(&iph2->ph1->index, iph2->msgid));
1455 unbindph12(iph2);
1456 remph2(iph2);
1457 delph2(iph2);
1461 if (isakmp_send(iph2->ph1, iph2->sendbuf) < 0)
1466 isakmp_pindex(&iph2->ph1->index, iph2->msgid));
1468 iph2->retry_counter--;
1470 iph2->scr = sched_new(iph2->ph1->rmconf->retry_interval,
1471 isakmp_ph2resend_stub, iph2);
1568 isakmp_ph2expire(iph2)
1569 struct ph2handle *iph2;
1573 SCHED_KILL(iph2->sce);
1575 src = strdup(saddrwop2str(iph2->src));
1576 dst = strdup(saddrwop2str(iph2->dst));
1582 iph2->status = PHASE2ST_EXPIRED;
1584 iph2->sce = sched_new(1, isakmp_ph2delete_stub, iph2);
1599 isakmp_ph2delete(iph2)
1600 struct ph2handle *iph2;
1604 SCHED_KILL(iph2->sce);
1606 src = strdup(saddrwop2str(iph2->src));
1607 dst = strdup(saddrwop2str(iph2->dst));
1613 unbindph12(iph2);
1614 remph2(iph2);
1615 delph2(iph2);
1629 isakmp_post_acquire(iph2)
1630 struct ph2handle *iph2;
1636 rmconf = getrmconf(iph2->dst);
1640 saddrwop2str(iph2->dst));
1649 saddrwop2str(iph2->dst));
1654 iph1 = getph1byaddr(iph2->src, iph2->dst);
1660 iph2->retry_checkph1 = lcconf->retry_checkph1;
1661 sc = sched_new(1, isakmp_chkph1there_stub, iph2);
1665 saddrwop2str(iph2->dst));
1668 if (isakmp_ph1begin_i(rmconf, iph2->dst) < 0) {
1679 iph2->retry_checkph1 = lcconf->retry_checkph1;
1680 sched_new(1, isakmp_chkph1there_stub, iph2);
1681 plog(LLV_INFO, LOCATION, iph2->dst,
1695 if (isakmp_ph2begin_i(iph1, iph2))
1705 isakmp_post_getspi(iph2)
1706 struct ph2handle *iph2;
1713 if (iph2->ph1->status == PHASE2ST_EXPIRED) {
1714 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
1724 [iph2->side]
1725 [iph2->status])(iph2, NULL) != 0)
1731 s_isakmp_state(ISAKMP_ETYPE_QUICK, iph2->side, iph2->status),
1747 isakmp_chkph1there(iph2)
1748 struct ph2handle *iph2;
1752 iph2->retry_checkph1--;
1753 if (iph2->retry_checkph1 < 0) {
1754 plog(LLV_ERROR, LOCATION, iph2->dst,
1757 sadbsecas2str(iph2->dst, iph2->src,
1758 iph2->satype, 0, 0));
1763 pk_sendeacquire(iph2);
1765 unbindph12(iph2);
1766 remph2(iph2);
1767 delph2(iph2);
1772 iph1 = getph1byaddr(iph2->src, iph2->dst);
1778 (void)isakmp_ph2begin_i(iph1, iph2);
1783 sched_new(1, isakmp_chkph1there_stub, iph2);
2053 set_isakmp_header2(vbuf, iph2, nptype)
2055 struct ph2handle *iph2;
2064 memcpy(&isakmp->i_ck, &iph2->ph1->index.i_ck, sizeof(cookie_t));
2065 memcpy(&isakmp->r_ck, &iph2->ph1->index.r_ck, sizeof(cookie_t));
2067 isakmp->v = iph2->ph1->version;
2069 isakmp->flags = iph2->flags;
2070 memcpy(&isakmp->msgid, &iph2->msgid, sizeof(isakmp->msgid));
2364 nostate2(iph2, msg)
2365 struct ph2handle *iph2;
2368 plog(LLV_ERROR, LOCATION, iph2->ph1->remote, "wrong state %u.\n",
2369 iph2->status);