Why has this code changed?

R.Nieuwenhuizen at cpb.nl R.Nieuwenhuizen at cpb.nl
Wed Feb 25 20:31:54 GMT 1998


After upleveling from samba-1.9.17p5 to samba-1.9.18.x I sometimes get the
following message logged in log.nmb: "Bind failed on port 137 of socket
address 0.0.0.0". This happens when the daemons are restarted at night
(leaving me some time to cycle the logfiles). After poking around in the
code I noticed the following changes in nmbd.c.

===========================================================
>   if ( isdaemon )
>     ClientNMB = open_socket_in(SOCK_DGRAM, port,0,0);
---
<   if (isdaemon)
<     ClientNMB = open_socket_in(SOCK_DGRAM,
port,0,interpret_addr(lp_socket_add
ress()));
421c347
>   ClientDGRAM = open_socket_in(SOCK_DGRAM,DGRAM_PORT,3,0);
---
<   ClientDGRAM =
open_socket_in(SOCK_DGRAM,DGRAM_PORT,3,interpret_addr(lp_socke
t_address()));
===========================================================

I seems that the old nmbd (samba-1.9.17p5) would only accept packets from
the interfaces mentioned with the parameter "interfaces". But the new nmbd
is willing to accept packets from all addresses. Can anyone (possibly
Jeremy?) explain this change of code?

BTW. The restarting of the samba daemons is a simple killing of the nmbd
procs followed by a killing of running smbd procs.

TIA,

Rene Nieuwenhuizen
Centraal Planbureau
The Hague
The Netherlands



More information about the samba mailing list