diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-15 21:22:18 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-15 21:22:18 +0000 |
commit | 452f60e0303d33a5f6f1d9c5648643068141b849 (patch) | |
tree | b21e798d14dc20b2e61801deaf95e0621cc35733 /source3/libsmb | |
parent | c9f2c1fc5e9aa8451d6eab12a3b542d01780132c (diff) | |
download | samba-452f60e0303d33a5f6f1d9c5648643068141b849.tar.gz samba-452f60e0303d33a5f6f1d9c5648643068141b849.tar.bz2 samba-452f60e0303d33a5f6f1d9c5648643068141b849.zip |
Fix from "Darrin B. Jewell" <jewell@bdi.com> to allow anything other than
nmbd to talk to nmbd if it's a WINS server.
Jeremy.
(This used to be commit 0e8147aecaf6941c77fd05b4b705ca31c1ec5760)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/namequery.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 781bca7eff..7714de760b 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -674,14 +674,22 @@ static BOOL resolve_wins(const char *name, int name_type, DEBUG(3,("resolve_wins: Attempting wins lookup for name %s<0x%x>\n", name, name_type)); - if( wins_srv_count() < 1 ) { + if (lp_wins_support()) { + /* + * We're providing WINS support. Call ourselves so + * long as we're not nmbd. + */ + extern struct in_addr loopback_ip; + wins_ip = loopback_ip; + wins_ismyip = True; + } else if( wins_srv_count() < 1 ) { DEBUG(3,("resolve_wins: WINS server resolution selected and no WINS servers listed.\n")); return False; + } else { + wins_ip = wins_srv_ip(); + wins_ismyip = ismyip(wins_ip); } - wins_ip = wins_srv_ip(); - wins_ismyip = ismyip(wins_ip); - DEBUG(3, ("resolve_wins: WINS server == <%s>\n", inet_ntoa(wins_ip)) ); if((wins_ismyip && !global_in_nmbd) || !wins_ismyip) { sock = open_socket_in( SOCK_DGRAM, 0, 3, |