[2123] in linux-net channel archive

home help back first fref pref prev next nref lref last post

problem with unix sockets in recent kernels

daemon@ATHENA.MIT.EDU (Raul Miller)
Sat Mar 16 08:44:06 1996

Date: 	16 Mar 1996 13:36:14 GMT
From: Raul Miller <rdm@tad.micro.umn.edu>
To: Linus.Torvalds@helsinki.fi
Cc: linux-kernel@vger.rutgers.edu, linux-net@vger.rutgers.edu

connect() hangs for me, with 1.3.70, 1.3.73 and 1.3.74.  It is fine
under 1.3.63.  This has something to do with my current configuration,
but I'm not sure how to best take this further.  [I was running
1.3.70, and 1.3.73 without problem several days ago.]

If you need more detail, just tell me what you want me to examine.



#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>

int fd;
struct sockaddr a;
#define	d	a.sa_data

main(){
	fd=socket(AF_UNIX, SOCK_STREAM, 0);
	if (-1==fd) exit(1);

	a.sa_family= AF_UNIX;
	strcpy(d, "/dev/log");
	connect(fd, &a, sizeof a - sizeof d + strlen(d));
}
	
	
FYI, here's /proc/net/unix:

Num       RefCount Protocol Flags    Type St Path
00cda808: 00000001 00000000 00000000 0001 01
00cda214: 00000001 00000000 00010000 0001 01 /dev/log
00a7f808: 00000002 00000000 00000000 0001 01 /dev/log
007ce808: 00000001 00000000 00000000 0001 02
007ce60c: 00000001 00000000 00000000 0001 02
007ce410: 00000001 00000000 00000000 0001 02
007ce018: 00000001 00000000 00000000 0001 02
004f1dfc: 00000001 00000000 00000000 0001 02
004f1a04: 00000001 00000000 00010000 0001 01 /dev/printer
004f1410: 00000002 00000000 00000000 0001 03
004fd808: 00000002 00000000 00000000 0001 01 /dev/log
004fd60c: 00000002 00000000 00000000 0001 03
004fd018: 00000002 00000000 00000000 0001 01 /dev/log
00097dfc: 00000002 00000000 00000000 0001 03
00097a04: 00000006 00000000 00010000 0001 01 /dev/log


-- 
Raul


home help back first fref pref prev next nref lref last post