View | Details | Raw Unified | Return to bug 259380 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/compat/linux/linux_socket.c (-2 / +10 lines)
Lines 1289-1296 linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args) Link Here
1289
	if (error != 0)
1289
	if (error != 0)
1290
		goto out;
1290
		goto out;
1291
1291
1292
	if (PTRIN(args->from) != NULL)
1292
	/*
1293
		error = linux_copyout_sockaddr(sa, PTRIN(args->from), msg.msg_namelen);
1293
	 * XXX. Seems that FreeBSD is different from Linux here. Linux
1294
	 * fill source address if underlying protocol provides it, while
1295
	 * FreeBSD fill it if underlying protocol is not connection-oriented.
1296
	 * So, kern_recvit() set msg.msg_namelen to 0 if protocol pr_flags
1297
	 * does not contains PR_ADDR flag.
1298
	 */
1299
	if (PTRIN(args->from) != NULL && msg.msg_namelen != 0)
1300
		error = linux_copyout_sockaddr(sa, PTRIN(args->from),
1301
		    msg.msg_namelen);
1294
1302
1295
	if (error == 0 && PTRIN(args->fromlen) != NULL)
1303
	if (error == 0 && PTRIN(args->fromlen) != NULL)
1296
		error = copyout(&msg.msg_namelen, PTRIN(args->fromlen),
1304
		error = copyout(&msg.msg_namelen, PTRIN(args->fromlen),

Return to bug 259380