Probelm setting socket options?
Adam Brudny
brudnya at volt.iem.pw.edu.pl
Sat Jun 5 08:44:10 GMT 2004
Hi guys!
I'm a quite newbe in sock API so please be patient :)
I've seen quite a lot of log entries in my smbd.log file like that:
Apr 29 00:42:09 host smbd[45372]: Failed to set socket option TCP_NODELAY
(Error Connection reset by peer)
I've tried to track it with truss (result below). My question is - does
the setsockopt() fails BECAUSE the socket is not connected anymore (client
closed it before setting the option) or the connection fails, and the
client disconnects BECAUSE TCP_NODELAY option couldn't have been set
properly ??? How to know that?
ajb
# truss -f -p PID
1654: fork() = 83030 (0x14456)
83030: close(18) = 0 (0x0)
83030: close(19) = 0 (0x0)
83030: close(0) = 0 (0x0)
83030: close(1) = 0 (0x0)
83030: open("/dev/null",0x2,00) = 0 (0x0)
83030: open("/dev/null",0x2,00) = 1 (0x1)
83030: setsockopt(0x17,0xffff,0x8,0xbfbfd99c,0x4) = 0 (0x0)
83030: setsockopt(0x17,0x6,0x1,0xbfbfd99c,0x4) ERR#54 'Connection reset
by peer'
83030: gettimeofday(0xbfbfc428,0x0) = 0 (0x0)
83030: getpid() = 83030 (0x14456)
83030: sendto(0x5,0xbfbfc8c0,0,0x0,NULL,0x0) = 106 (0x6a)
83030: geteuid() = 0 (0x0)
83030: fstat(22,0xbfbfd0a0) = 0 (0x0)
83030: getpeername(0x17,0xbfbfdaa0,0xbfbfda9c) ERR#57 'Socket is not
connected'
... <quite a lot of more entries but looks like a normal samba close
operation> ....
More information about the freebsd-net
mailing list