Home | History | Annotate | Download | only in racoon

Lines Matching refs:remote

212 	struct sockaddr_storage remote;
214 unsigned int remote_len = sizeof(remote);
222 MSG_PEEK, (struct sockaddr *)&remote, &remote_len,
236 0, (struct sockaddr *)&remote, &remote_len)) != 1) {
279 plog(LLV_ERROR, LOCATION, (struct sockaddr *)&remote,
284 0, (struct sockaddr *)&remote, &remote_len)) < 0) {
297 0, (struct sockaddr *)&remote, &remote_len)) < 0) {
312 0, (struct sockaddr *)&remote, &remote_len)) < 0) {
321 0, (struct sockaddr *)&remote, &remote_len,
343 plog(LLV_ERROR, LOCATION, (struct sockaddr *)&remote,
353 (struct sockaddr *)&remote,
358 if (extract_port((struct sockaddr *)&remote) == 0) {
359 plog(LLV_ERROR, LOCATION, (struct sockaddr *)&remote,
369 res=check_recvdpkt((struct sockaddr *)&remote,(struct sockaddr *)&local, buf);
373 saddr2str((struct sockaddr *)&remote), res);
379 if (isakmp_main(buf, (struct sockaddr *)&remote,
397 isakmp_main(msg, remote, local)
399 struct sockaddr *remote, *local;
407 isakmp_printpacket(msg, remote, local, 0);
412 plog(LLV_ERROR, LOCATION, remote,
425 plog(LLV_ERROR, LOCATION, remote,
432 plog(LLV_ERROR, LOCATION, remote,
443 plog(LLV_ERROR, LOCATION, remote,
451 isakmp_info_send_nx(isakmp, remote, local,
453 plog(LLV_ERROR, LOCATION, remote,
464 plog(LLV_DEBUG, LOCATION, remote,
474 ((cmpsaddrstrict(iph1->remote, remote) != 0) ||
478 racoon_free(iph1->remote);
480 iph1->remote = NULL;
484 iph1->remote = dupsaddr(remote);
485 if (iph1->remote == NULL) {
486 plog(LLV_ERROR, LOCATION, iph1->remote,
494 plog(LLV_ERROR, LOCATION, iph1->remote,
509 saddr2str_fromto ("%s<->%s", iph1->remote, iph1->local));
516 if (cmpsaddrstrict(iph1->remote, remote) != 0) {
519 saddr_db = racoon_strdup(saddr2str(iph1->remote));
520 saddr_act = racoon_strdup(saddr2str(remote));
524 plog(LLV_WARNING, LOCATION, remote,
525 "remote address mismatched. db=%s, act=%s\n",
546 plog(LLV_ERROR, LOCATION, remote,
565 plog(LLV_DEBUG, LOCATION, remote,
572 if (isakmp_ph1begin_r(msg, remote, local,
582 remote,
596 plog(LLV_ERROR, LOCATION, iph1->remote,
606 return frag_handler(iph1, msg, remote, local);
611 plog(LLV_ERROR, LOCATION, iph1->remote,
620 plog(LLV_INFO, LOCATION, remote,
637 plog(LLV_ERROR, LOCATION, remote,
642 if (cmpsaddrstrict(iph1->remote, remote) != 0) {
643 plog(LLV_WARNING, LOCATION, remote,
644 "remote address mismatched. "
646 saddr2str(iph1->remote));
652 return frag_handler(iph1, msg, remote, local);
664 isakmp_info_send_nx(isakmp, remote, local,
666 plog(LLV_ERROR, LOCATION, remote,
682 return frag_handler(iph1, msg, remote, local);
687 plog(LLV_ERROR, LOCATION, remote,
716 plog(LLV_ERROR, LOCATION, iph1->remote,
728 plog(LLV_ERROR, LOCATION, remote,
736 return frag_handler(iph1, msg, remote, local);
748 isakmp->etype, saddr2str(remote));
754 return frag_handler(iph1, msg, remote, local);
765 isakmp->etype, saddr2str(remote));
796 plog(LLV_ERROR, LOCATION, iph1->remote,
815 plog(LLV_ERROR, LOCATION, iph1->remote,
843 plog(LLV_ERROR, LOCATION, iph1->remote,
897 && iph1->rmconf->ini_contact && !getcontacted(iph1->remote)) {
902 if (inscontacted(iph1->remote) == -1) {
903 plog(LLV_ERROR, LOCATION, iph1->remote,
968 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
976 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
1004 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
1022 isakmp_ph1begin_i(rmconf, remote, local)
1024 struct sockaddr *remote, *local;
1062 /* XXX copy remote address */
1063 if (copy_ph1addresses(iph1, rmconf, remote, local) < 0) {
1082 a, saddr2str(iph1->remote));
1117 isakmp_ph1begin_r(msg, remote, local, etype)
1119 struct sockaddr *remote, *local;
1131 rmconf = getrmconf(remote);
1133 plog(LLV_ERROR, LOCATION, remote,
1142 plog(LLV_ERROR, LOCATION, remote,
1184 /* copy remote address */
1185 if (copy_ph1addresses(iph1, rmconf, remote, local) < 0) {
1200 a, saddr2str(iph1->remote));
1220 plog(LLV_ERROR, LOCATION, remote,
1243 return isakmp_main(msg, remote, local);
1333 iph2->dst = dupsaddr(iph1->remote); /* XXX should be considered */
1378 plog(LLV_ERROR, LOCATION, iph1->remote,
1397 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
1751 "NAT-T is enabled in at least one remote{} section,\n");
1840 saddr2str_fromto("from %s to %s", iph1->local, iph1->remote));
1853 iph1->local, iph1->remote, lcconf->count_persend);
1895 EVT_PUSH(iph1->local, iph1->remote,
1905 EVT_PUSH(iph1->local, iph1->remote,
2000 dst = racoon_strdup(saddr2str(iph1->remote));
2049 dst = racoon_strdup(saddr2str(iph1->remote));
2056 EVT_PUSH(iph1->local, iph1->remote, EVTT_PHASE1_DOWN, NULL);
2183 set_port(iph2->dst, extract_port(iph1->remote));
2250 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
2337 plog(LLV_DEBUG2, LOCATION, NULL, "iph1->remote: %s\n", saddr2str(iph1->remote));
2342 set_port(iph2->dst, extract_port(iph1->remote));
2464 isakmp_newcookie(place, remote, local)
2466 struct sockaddr *remote;
2479 if (remote->sa_family != local->sa_family) {
2481 "address family mismatch, remote:%d local:%d\n",
2482 remote->sa_family, local->sa_family);
2485 switch (remote->sa_family) {
2488 sa1 = (caddr_t)&((struct sockaddr_in *)remote)->sin_addr;
2494 sa1 = (caddr_t)&((struct sockaddr_in6 *)remote)->sin6_addr;
2500 "invalid family: %d\n", remote->sa_family);
2516 port = ((struct sockaddr_in *)remote)->sin_port;
2858 copy_ph1addresses(iph1, rmconf, remote, local)
2861 struct sockaddr *remote, *local;
2865 /* address portion must be grabbed from real remote address "remote" */
2866 iph1->remote = dupsaddr(remote);
2867 if (iph1->remote == NULL)
2871 * if remote has no port # (in case of initiator - from ACQUIRE msg)
2872 * - if remote.conf specifies port #, use that
2873 * - if remote.conf does not, use 500
2874 * if remote has port # (in case of responder - from recvfrom(2))
2875 * respect content of "remote".
2877 if (extract_port(iph1->remote) == 0) {
2878 port = extract_port(rmconf->remote);
2881 set_port(iph1->remote, port);
2885 iph1->local = getlocaladdr(iph1->remote);
2909 plog(LLV_ERROR, LOCATION, iph1->remote, "wrong state %u.\n",
2919 plog(LLV_ERROR, LOCATION, iph2->ph1->remote, "wrong state %u.\n",
2931 dst = racoon_strdup(saddr2str(iph1->remote));
2940 EVT_PUSH(iph1->local, iph1->remote, EVTT_PHASE1_UP, NULL);
2942 EVT_PUSH(iph1->local, iph1->remote, EVTT_NO_ISAKMP_CFG, NULL);
3022 frag_handler(iph1, msg, remote, local)
3025 struct sockaddr *remote;
3032 plog(LLV_ERROR, LOCATION, remote,
3036 return isakmp_main(newmsg, remote, local);
3082 if (iph1->remote != NULL) {
3083 sin = (struct sockaddr_in *)iph1->remote;
3205 new_iph1 = getph1byaddr(iph1->local, iph1->remote, 1);
3256 * Select only SAs where src == local and dst == remote (outgoing)
3257 * or src == remote and dst == local (incoming).
3259 if ((CMPSADDR(iph1->local, src) || CMPSADDR(iph1->remote, dst)) &&
3260 (CMPSADDR(iph1->local, dst) || CMPSADDR(iph1->remote, src))) {