This commit finally gives us multiple wins server groups. We now
authorAndrew Tridgell <tridge@samba.org>
Wed, 26 Jun 2002 12:17:11 +0000 (12:17 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 26 Jun 2002 12:17:11 +0000 (12:17 +0000)
commitcaeaa0acb02f681be6025e3eafded223983960a0
tree392e7175718940eff1ebc0ba769a488494e4e9bb
parent38bd5bf9eb18bfd4312ff81d566b4e9c90d7e07d
This commit finally gives us multiple wins server groups. We now
accept an extended syntax for 'wins server' like this:

  wins server = group1:192.168.2.10 group2:192.168.3.99 group1:192.168.0.1

The tags before the IPs don't mean anything, they are just a way of
grouping IPs together. If you use the old syntax (ie. no ':') then
an implicit group name of '*' is used. In general I'd recommend people
use interface names for the group names, but it doesn't matter much.

When we register in nmbd we try to register all our IPs with each group
of WINS servers. We keep trying until all of them are registered with
every group, falling back to the failover WINS servers for each group
as we go.

When we do a WINS lookup we try each of the WINS servers for each group.
If a WINS server for a group gives a negative answer then we give up
on that group and move to the next group. If it times out then
we move to the next failover wins server in the group.

In either case, if a WINS server doesn't respond then we mark it dead
for 10 minutes, to prevent lengthy waits for dead servers.
(This used to be commit e125f06058b6b51382cf046b1dbb30728b8aeda5)
source3/lib/wins_srv.c
source3/libsmb/namequery.c
source3/nmbd/nmbd_nameregister.c
source3/nmbd/nmbd_packets.c
source3/nsswitch/winbindd_wins.c
source3/nsswitch/wins.c
source3/utils/nmblookup.c
source3/web/diagnose.c