Lines Matching refs:remote
216 struct sockaddr_storage remote; local
218 unsigned int remote_len = sizeof(remote);
226 MSG_PEEK, (struct sockaddr *)&remote, &remote_len,
240 0, (struct sockaddr *)&remote, &remote_len)) != 1) {
283 plog(LLV_ERROR, LOCATION, (struct sockaddr *)&remote,
288 0, (struct sockaddr *)&remote, &remote_len)) < 0) {
301 0, (struct sockaddr *)&remote, &remote_len)) < 0) {
316 0, (struct sockaddr *)&remote, &remote_len)) < 0) {
325 0, (struct sockaddr *)&remote, &remote_len,
347 plog(LLV_ERROR, LOCATION, (struct sockaddr *)&remote,
357 (struct sockaddr *)&remote,
362 if (extract_port((struct sockaddr *)&remote) == 0) {
363 plog(LLV_ERROR, LOCATION, (struct sockaddr *)&remote,
373 res=check_recvdpkt((struct sockaddr *)&remote,(struct sockaddr *)&local, buf);
377 saddr2str((struct sockaddr *)&remote), res);
383 if (isakmp_main(buf, (struct sockaddr *)&remote,
401 isakmp_main(msg, remote, local) in isakmp_main() argument
403 struct sockaddr *remote, *local;
411 isakmp_printpacket(msg, remote, local, 0);
416 plog(LLV_ERROR, LOCATION, remote,
429 plog(LLV_ERROR, LOCATION, remote,
436 plog(LLV_ERROR, LOCATION, remote,
447 plog(LLV_ERROR, LOCATION, remote,
455 isakmp_info_send_nx(isakmp, remote, local,
457 plog(LLV_ERROR, LOCATION, remote,
468 plog(LLV_DEBUG, LOCATION, remote,
478 ((cmpsaddrstrict(iph1->remote, remote) != 0) ||
482 racoon_free(iph1->remote);
484 iph1->remote = NULL;
488 iph1->remote = dupsaddr(remote);
489 if (iph1->remote == NULL) {
490 plog(LLV_ERROR, LOCATION, iph1->remote,
498 plog(LLV_ERROR, LOCATION, iph1->remote,
513 saddr2str_fromto ("%s<->%s", iph1->remote, iph1->local));
520 if (cmpsaddrstrict(iph1->remote, remote) != 0) {
523 saddr_db = racoon_strdup(saddr2str(iph1->remote));
524 saddr_act = racoon_strdup(saddr2str(remote));
528 plog(LLV_WARNING, LOCATION, remote,
550 plog(LLV_ERROR, LOCATION, remote,
569 plog(LLV_DEBUG, LOCATION, remote,
576 if (isakmp_ph1begin_r(msg, remote, local,
586 plog(LLV_DEBUG, LOCATION, remote,
600 plog(LLV_ERROR, LOCATION, iph1->remote,
610 return frag_handler(iph1, msg, remote, local);
615 plog(LLV_ERROR, LOCATION, iph1->remote,
624 plog(LLV_INFO, LOCATION, remote,
641 plog(LLV_ERROR, LOCATION, remote,
646 if (cmpsaddrstrict(iph1->remote, remote) != 0) {
647 plog(LLV_WARNING, LOCATION, remote,
650 saddr2str(iph1->remote));
656 return frag_handler(iph1, msg, remote, local);
668 isakmp_info_send_nx(isakmp, remote, local,
670 plog(LLV_ERROR, LOCATION, remote,
686 return frag_handler(iph1, msg, remote, local);
691 plog(LLV_ERROR, LOCATION, remote,
720 plog(LLV_ERROR, LOCATION, iph1->remote,
732 plog(LLV_ERROR, LOCATION, remote,
740 return frag_handler(iph1, msg, remote, local);
752 isakmp->etype, saddr2str(remote));
758 return frag_handler(iph1, msg, remote, local);
769 isakmp->etype, saddr2str(remote));
800 plog(LLV_ERROR, LOCATION, iph1->remote,
819 plog(LLV_ERROR, LOCATION, iph1->remote,
847 plog(LLV_ERROR, LOCATION, iph1->remote,
901 && iph1->rmconf->ini_contact && !getcontacted(iph1->remote)) {
906 if (inscontacted(iph1->remote) == -1) {
907 plog(LLV_ERROR, LOCATION, iph1->remote,
972 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
980 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
1008 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
1026 isakmp_ph1begin_i(rmconf, remote, local) in isakmp_ph1begin_i() argument
1028 struct sockaddr *remote, *local;
1067 if (copy_ph1addresses(iph1, rmconf, remote, local) < 0) {
1086 a, saddr2str(iph1->remote));
1121 isakmp_ph1begin_r(vchar_t *msg, struct sockaddr *remote, in isakmp_ph1begin_r() argument
1133 rmconf = getrmconf(remote); in isakmp_ph1begin_r()
1135 plog(LLV_ERROR, LOCATION, remote, in isakmp_ph1begin_r()
1144 plog(LLV_ERROR, LOCATION, remote, in isakmp_ph1begin_r()
1187 if (copy_ph1addresses(iph1, rmconf, remote, local) < 0) { in isakmp_ph1begin_r()
1202 a, saddr2str(iph1->remote)); in isakmp_ph1begin_r()
1222 plog(LLV_ERROR, LOCATION, remote, in isakmp_ph1begin_r()
1245 return isakmp_main(msg, remote, local); in isakmp_ph1begin_r()
1335 iph2->dst = dupsaddr(iph1->remote); /* XXX should be considered */
1380 plog(LLV_ERROR, LOCATION, iph1->remote,
1399 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
1845 saddr2str_fromto("from %s to %s", iph1->local, iph1->remote));
1858 iph1->local, iph1->remote, lcconf->count_persend);
1900 EVT_PUSH(iph1->local, iph1->remote,
1910 EVT_PUSH(iph1->local, iph1->remote,
2005 dst = racoon_strdup(saddr2str(iph1->remote));
2054 dst = racoon_strdup(saddr2str(iph1->remote));
2061 EVT_PUSH(iph1->local, iph1->remote, EVTT_PHASE1_DOWN, NULL);
2187 set_port(iph2->dst, extract_port(iph1->remote));
2254 plog(LLV_ERROR, LOCATION, iph2->ph1->remote,
2341 plog(LLV_DEBUG2, LOCATION, NULL, "iph1->remote: %s\n", saddr2str(iph1->remote));
2346 set_port(iph2->dst, extract_port(iph1->remote));
2468 isakmp_newcookie(place, remote, local) in isakmp_newcookie() argument
2470 struct sockaddr *remote;
2483 if (remote->sa_family != local->sa_family) {
2486 remote->sa_family, local->sa_family);
2489 switch (remote->sa_family) {
2492 sa1 = (caddr_t)&((struct sockaddr_in *)remote)->sin_addr;
2498 sa1 = (caddr_t)&((struct sockaddr_in6 *)remote)->sin6_addr;
2504 "invalid family: %d\n", remote->sa_family);
2520 port = ((struct sockaddr_in *)remote)->sin_port;
2862 copy_ph1addresses(iph1, rmconf, remote, local) in copy_ph1addresses() argument
2865 struct sockaddr *remote, *local;
2870 iph1->remote = dupsaddr(remote);
2871 if (iph1->remote == NULL)
2881 if (extract_port(iph1->remote) == 0) {
2882 port = extract_port(rmconf->remote);
2885 set_port(iph1->remote, port);
2889 iph1->local = getlocaladdr(iph1->remote);
2913 plog(LLV_ERROR, LOCATION, iph1->remote, "wrong state %u.\n",
2923 plog(LLV_ERROR, LOCATION, iph2->ph1->remote, "wrong state %u.\n",
2935 dst = racoon_strdup(saddr2str(iph1->remote));
2944 EVT_PUSH(iph1->local, iph1->remote, EVTT_PHASE1_UP, NULL);
2946 EVT_PUSH(iph1->local, iph1->remote, EVTT_NO_ISAKMP_CFG, NULL);
3027 frag_handler(iph1, msg, remote, local) in frag_handler() argument
3030 struct sockaddr *remote;
3037 plog(LLV_ERROR, LOCATION, remote,
3041 return isakmp_main(newmsg, remote, local);
3087 if (iph1->remote != NULL) {
3088 sin = (struct sockaddr_in *)iph1->remote;
3214 new_iph1 = getph1byaddr(iph1->local, iph1->remote, 1);
3268 if ((CMPSADDR(iph1->local, src) || CMPSADDR(iph1->remote, dst)) &&
3269 (CMPSADDR(iph1->local, dst) || CMPSADDR(iph1->remote, src))) {