[RESENDx2][BUG] interpret_interface() destroys token

Jeremy Allison jra at samba.org
Thu Jun 24 23:18:23 GMT 2004


On Mon, Jun 21, 2004 at 03:08:42PM +0200, Nick Wellnhofer wrote:
> [ This is the third time I'm sending this. Why is noone interested? Is 
> this the wrong list? ]
> 
> 
> Hi,
> 
> the following code in interpret_interface() in lib/interface.c destroys
> the token parameter (Samba version 3.0.2).
> 
> 	/* parse it into an IP address/netmasklength pair */
> 	*p++ = 0;
> 
> If we have an IP address/netmask token and interpret_interface() is
> called a second time it only sees the IP address, can't find the netmask
> and fails.
> 
> This is a problem with nmbd, because it reloads all interfaces if the
> list of interfaces changes. If you specify an interface with an IP
> address/netmask pair in smb.conf, start nmbd and any new interface comes
> up or goes down (a PPP connection for example) nmbd dies after a while
> with the message:
> 
>     reload_interfaces: No subnets to listen to. Shutting down...
> 
> There seem to be quite a few people who had this problem.
> 
> http://www.google.com/search?q=nmbd+%22No+subnets+to+listen+to%22
> 
> I have attached a patch that fixes the bug, but is a little kludgy and
> not thread-safe.

Applied a varient of this, sorry it took so long.

Jeremy.


More information about the samba-technical mailing list