wins failover not working + patch

Christopher R. Hertel crh at nts.umn.edu
Fri Aug 17 20:24:53 GMT 2001


> Ok , nice someone is working on it.
> 
> I was wondering if I was the only one using this feature!!
> 
> 
> I saw the function lib/wins_srv.c:wins_srv_ip(), but this function only
> return a good wins found in wins_srv_list, but in

Right.  The function returns the first 'live' WINS server in the list.

> libsmb/namequery.c:resolve_wins() call wins_srv_ip only once and then in
> libsmb/namerequery.c:name_query() it call wins_srv_died.

Right, but the right place to check for a "dead" WINS server is in the
query code.  If the WINS server does not respond then we mark it dead. 
Pinging it, or opening a connection to it at any other time is wasteful. 
We only care if it is alive when we want to ask a question of it. 

I should also point out that the call to wins_srv_died() should be 
commented out.  Hmmm... It doesn't seem to be causing trouble.  Still, 
that code isn't supposed to be 'live' yet.

Anyway, yes I can change the code so that it tries all of the WINS servers
in sequence until it finds a working one or runs out of entries.  I had 
not done that yet since the code wasn't "live" yet.

> It would be better to check if the wins is up in wins_srv_ip() and if not:

No.  The name_query() function already does a proper test.  It needs to
try three times (per RFC1002) and provide enough time for a response. 
That test is done in only one place in Samba.  The wins_srv.c code
provides only a simple list manger.  I'd rather let the query code decide
whether the server is dead, since that's one of the things that the query
code can do.

> Does it make sense?

I understand what you are trying to do, but I have reasons for doing this
differently.  See above.

> Thanks for the responds.

Thanks for your interest!

Chris -)-----

-- 
Christopher R. Hertel -)-----                   University of Minnesota
crh at nts.umn.edu              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your hands...you choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz




More information about the samba-technical mailing list