Failed to set socket option error in Samba 2.0.6/Solaris 7
David Collier-Brown - Sun Canada
davecb at scot.canada.sun.com
Tue Apr 4 19:11:46 GMT 2000
"Eric Boehm" <boehm at nortelnetworks.com> wrote:
| Here's the preceding 90 lines and following 10 lines
| [2000/04/04 08:16:53, 2] lib/interface.c:add_interface(83)
| added interface ip=47.202.34.76 bcast=47.202.47.255 nmask=255.255.240.0
| [2000/04/04 08:16:53, 0] lib/util_sock.c:set_socket_options(148)
| Failed to set socket option SO_KEEPALIVE (Error Bad file number)
| [2000/04/04 08:16:53, 0] lib/util_sock.c:set_socket_options(148)
| Failed to set socket option TCP_NODELAY (Error Bad file number)
Rats!
Looks like we'll need to add some debugging, perferably
each caller to set_socket_options...
in lib/util_sock.c, in set_socket_options, after the
declaration of "fstring tok", add
DEBUG(10,("in set_socket_options(%d, %s)\n", fd, options));
This will tell us the fd that didn't work.
Now, in each of the following places, add:
DEBUG(10, ("ame of first parm>\n");
just before the call:
File Function Line
1 nmbd.c open_sockets 517 set_socket_options( ClientNMB,
"SO_BROADCAST" );
2 nmbd.c open_sockets 518 set_socket_options( ClientDGRAM,
"SO_BROADCAST" );
3 nmbd_subnetdb.c make_subnet 165 set_socket_options(nmb_sock,"SO_BROAD
CAST");
4 nmbd_subnetdb.c make_subnet 166 set_socket_options(dgram_sock,"SO_BRO
ADCAST");
5 server.c open_sockets_inetd 83 set_socket_options(Client,"SO_KEEPALI
6 server.c open_sockets_inetd 84 set_socket_options(Client,user_socket
_options);
7 server.c open_sockets 237 set_socket_options(Client,"SO_KEEPALI
VE");
8 server.c open_sockets 238 set_socket_options(Client,user_socket
_options);
9 server.c reload_services 317 set_socket_options(Client,"SO_KEEPALI
VE");
A server.c reload_services 318 set_socket_options(Client,user_socket
_options);
VE");
B nmblookup.c open_sockets 53 set_socket_options(ServerFD,"SO_BROAD
CAST");
For example, in open_sockets, somewhere around
line 53 (which is only approximate), you'd add
DEBUG(10("calling set_socket_options(ServerFD...)\n");
This will tell you which FD is broken, after which we'll
look to see why.
--dave
--
David Collier-Brown in Boston
Phone: (781) 442-0734, Room BUR03-3632
More information about the samba-technical
mailing list