1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
Commit Graph

6 Commits

Author SHA1 Message Date
Tim Potter
778f5f77a6 Got medieval on another pointless extern. Removed extern struct ipzero
and replaced with two functions:

	void zero_ip(struct in_adder *ip);
	BOOL is_zero_ip(struct in_addr ip);
0001-01-01 00:00:00 +00:00
Simo Sorce
60e907b7e8 move to SAFE_FREE() 0001-01-01 00:00:00 +00:00
Christopher R. Hertel
efaa9ef5e7 Small changes to get ready for adding WINS failover to smbd and clients.
My plan is to change the lp_wins_server() function to lp_wins_server_list().
My reason being: With WINS failover the 'wins server' parameter may take a
list of WINS server names/IPs instead of just one.  If it's a list, then
calling lp_wins_server() won't give you what you expect (that is, a single
WINS server name or IP).  Instead, the functions in wins_srv.c should be
used.  You can get either the name or IP of the 'current' working WINS
server in the list.

Chris -)-----
0001-01-01 00:00:00 +00:00
Jeremy Allison
448ff58fd5 Fixed %d printf with unsigned long arg.
Jeremy.
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
73aa188320 Instead of handing back a string (which might be a DNS name or an IP
string), the wins_srv module now hands back a struct in_addr when it's
called.  It caches the IP address once it has been looked up.  The IP
is cleared (and must be looked up again) if the 'wins server' parameter
is reread, or if the node is marked 'dead'.  A dead node will not be
re-tried for 10 minutes (per a #define in wins_srv.c).

As it was, the code was reading the WINS server name or IP directly from
lp_wins_server.  That's okay, except that if the value was expressed as
a name, then a DNS lookup would be done every time the client wanted to
talk to the server.

I still need to work out the implications of failover regarding the
'unicast subnet' list.

Chris -)-----
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
cc08bdc74f First cut toward adding WINS server failover.
*Note: failover doesn't actually work yet!*  It's just that the code I'm
adding provides all of the pieces necessary.

I do have one big question.  Something that I'll have to ask Jeremy, I'm
thinkin'.  In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to
set up the Unicast subnet.

...so what happens if the WINS server changes?

My guess is either:
  a) nothing.
  b) I'd have to change the unicast subnet entry whenever the WINS server
     changes.

Urq.

BTW, the lp_wins_server() function no longer returns the WINS server name
or IP.  It returns the list of WINS servers entered in smb.conf.  To get
the currently 'live' WINS server, use the wins_srv() function.

Fun, eh?

Chris -)-----
0001-01-01 00:00:00 +00:00