Re: Blocking DNS lookup on MC startup

On Mon, 5 Jun 2006, Leonard den Ottolander wrote:

load_interfaces() is doing gethostbyname() for every single value of the
"interfaces" parameter of smb.conf. If interfaces doesn't contain an
ip_address/netmask pair load_interfaces() tries to resolve the value
via gethostbyname() :(

Are you referring to interpret_addr()?


I'd say the case where the interface is identified by a name is a bit of a corner case.

Not really. Please, look here:

It seems historic samba didn't allow interface names in the
"interfaces" directive. However newer samba versions allow the
use of interface names and it is used by people. If you think
about it - it makes a lot of sense.

Another solution would be to delay the samba lib initialization until the
first samba request. This way it will be clearly visible for the user that
the hang is due to a samba request. Of course the initialization must be
made interruptable.

Opinions ?

I don't have any fundamental objections against delaying the
initialization of smbfs, but is it really worth the effort? Don't you
think we catch most cases with making the call to Get_Hostbyname() in
get_myname() conditional?

Unfortunately not.

Switching to a newer samba lib is another option. It has been discussed in the past - at least in bugzilla there is an entry discussing a switch
to newer samba. Of course we can hack the intree samba lib but I think
it is not worth doing it.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]