mirror of
https://github.com/samba-team/samba.git
synced 2025-02-21 01:59:07 +03:00
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)
This commit is contained in:
parent
c9f2c1fc5e
commit
452f60e030
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user