lkml.org 
[lkml]   [2002]   [Aug]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 8 Aug 2002 18:29:30 -0600 (MDT)
FromThunder from the hill <>
SubjectRe: Unix-domain sockets - abstract addresses
Hi,

On Thu, 8 Aug 2002 kuznet@ms2.inr.ac.ru wrote:
> -	msg->msg_namelen = sizeof(short);
> +	msg->msg_namelen = 0;

This version is for 2.5:

--- linus-2.5/net/unix/af_unix.c	Mon Aug  5 12:02:05 2002
+++ thunder-2.5/net/unix/af_unix.c	Thu Aug  8 18:28:49 2002
@@ -79,6 +79,8 @@
  *		  with BSD names.
  */
 
+#undef unix	/* KBUILD_MODNAME */
+
 #include <linux/module.h>
 #include <linux/config.h>
 #include <linux/kernel.h>
@@ -1400,7 +1402,9 @@
 {
 	struct unix_sock *u = unix_sk(sk);
 
-	msg->msg_namelen = sizeof(short);
+	// msg->msg_namelen = sizeof(short);
+	msg->msg_namelen = 0;
+
 	if (u->addr) {
 		msg->msg_namelen = u->addr->len;
 		memcpy(msg->msg_name, u->addr->name, u->addr->len);
			Thunder
-- 
.-../../-./..-/-..- .-./..-/.-.././.../.-.-.-

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:22    [from the cache]
©2003-2008