View | Details | Raw Unified | Return to bug 222065
Collapse All | Expand All

(-)src/racoon/isakmp_var.h (-1 / +1 lines)
Lines 128-134 Link Here
128
#endif
128
#endif
129
129
130
extern int copy_ph1addresses __P(( struct ph1handle *,
130
extern int copy_ph1addresses __P(( struct ph1handle *,
131
	struct remoteconf *, struct sockaddr *, struct sockaddr *));
131
	struct remoteconf *, struct sockaddr *, struct sockaddr *, int));
132
extern void log_ph1established __P((const struct ph1handle *));
132
extern void log_ph1established __P((const struct ph1handle *));
133
133
134
extern void script_hook __P((struct ph1handle *, int));
134
extern void script_hook __P((struct ph1handle *, int));
(-)src/racoon/isakmp.c (-4 / +5 lines)
Lines 1075-1081 isakmp_ph1begin_i(rmconf, remote, local) Link Here
1075
	iph1->approval = NULL;
1075
	iph1->approval = NULL;
1076
1076
1077
	/* XXX copy remote address */
1077
	/* XXX copy remote address */
1078
	if (copy_ph1addresses(iph1, rmconf, remote, local) < 0) {
1078
	if (copy_ph1addresses(iph1, rmconf, remote, local, 1) < 0) {
1079
		delph1(iph1);
1079
		delph1(iph1);
1080
		return NULL;
1080
		return NULL;
1081
	}
1081
	}
Lines 1190-1196 isakmp_ph1begin_r(msg, remote, local, et Link Here
1190
1190
1191
	/* copy remote address; remote and local always contain
1191
	/* copy remote address; remote and local always contain
1192
	 * port numbers so rmconf is not needed */
1192
	 * port numbers so rmconf is not needed */
1193
	if (copy_ph1addresses(iph1, NULL, remote, local) < 0) {
1193
	if (copy_ph1addresses(iph1, NULL, remote, local, 0) < 0) {
1194
		delph1(iph1);
1194
		delph1(iph1);
1195
		return -1;
1195
		return -1;
1196
	}
1196
	}
Lines 2906-2915 isakmp_printpacket(msg, from, my, decode Link Here
2906
#endif /*HAVE_PRINT_ISAKMP_C*/
2906
#endif /*HAVE_PRINT_ISAKMP_C*/
2907
2907
2908
int
2908
int
2909
copy_ph1addresses(iph1, rmconf, remote, local)
2909
copy_ph1addresses(iph1, rmconf, remote, local, initiator)
2910
	struct ph1handle *iph1;
2910
	struct ph1handle *iph1;
2911
	struct remoteconf *rmconf;
2911
	struct remoteconf *rmconf;
2912
	struct sockaddr *remote, *local;
2912
	struct sockaddr *remote, *local;
2913
	int initiator;
2913
{
2914
{
2914
	u_int16_t port;
2915
	u_int16_t port;
2915
2916
Lines 2925-2931 copy_ph1addresses(iph1, rmconf, remote, Link Here
2925
	 * if remote has port # (in case of responder - from recvfrom(2))
2926
	 * if remote has port # (in case of responder - from recvfrom(2))
2926
	 * respect content of "remote".
2927
	 * respect content of "remote".
2927
	 */
2928
	 */
2928
	if (extract_port(iph1->remote) == 0) {
2929
	if (initiator || extract_port(iph1->remote) == 0) {
2929
		port = 0;
2930
		port = 0;
2930
		if (rmconf != NULL)
2931
		if (rmconf != NULL)
2931
			port = extract_port(rmconf->remote);
2932
			port = extract_port(rmconf->remote);
(-)src/racoon/isakmp_inf.c (-1 / +1 lines)
Lines 725-731 isakmp_info_send_nx(isakmp, remote, loca Link Here
725
#endif
725
#endif
726
726
727
	/* copy remote address */
727
	/* copy remote address */
728
	if (copy_ph1addresses(iph1, NULL, remote, local) < 0)
728
	if (copy_ph1addresses(iph1, NULL, remote, local, 0) < 0)
729
		goto end;
729
		goto end;
730
730
731
	tlen = sizeof(*n) + spisiz;
731
	tlen = sizeof(*n) + spisiz;

Return to bug 222065