diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-04-09 01:19:25 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-04-09 01:19:25 +0000 |
commit | 20b5dea237916902437ce3dcdb7c253fd1ad3585 (patch) | |
tree | e68a033a708efed2c93c95a73da978ebf9221c34 /source3/nameelect.c | |
parent | 02e610b927c9038cf498f726d807ee95a14714be (diff) | |
download | samba-20b5dea237916902437ce3dcdb7c253fd1ad3585.tar.gz samba-20b5dea237916902437ce3dcdb7c253fd1ad3585.tar.bz2 samba-20b5dea237916902437ce3dcdb7c253fd1ad3585.zip |
Large changes from jra@cygnus.com. Mainly browser updates.
access.c: Fixed crash if yp domain unavailable.
includes.h: Moved ifdefs for minor platform.
interface.c: Changed name of ipgrp to wins_ip to make it clearer.
loadparm.c: Changed default of wins support to 'no'.
nameannounce.c: Many changes to fix cross subnet browsing.
namebrowse.c: Many changes to fix cross subnet browsing.
namedbname.c: Many changes to fix cross subnet browsing.
namedbresp.c: Many changes to fix cross subnet browsing.
namedbsubnet.c: Many changes to fix cross subnet browsing.
namedbwork.c: Many changes to fix cross subnet browsing.
nameelect.c: Many changes to fix cross subnet browsing.
namelogon.c: Many changes to fix cross subnet browsing.
namepacket.c: Many changes to fix cross subnet browsing.
nameresp.c: Many changes to fix cross subnet browsing.
nameserv.c: Many changes to fix cross subnet browsing.
nameserv.h: Many changes to fix cross subnet browsing.
nameservreply.c: Many changes to fix cross subnet browsing.
nameservresp.c: Many changes to fix cross subnet browsing.
namework.c: Many changes to fix cross subnet browsing.
nmbd.c: Change to search wins subnet.
nmbsync.c: Change to check if we are any master before proceeding.
proto.h: Added find_subnet_all() and check_work_servertype().
util.c: Moved 'done' settings on name resolution.
(This used to be commit a82476eee2c521e5eed092bc367da0a7cef23de1)
Diffstat (limited to 'source3/nameelect.c')
-rw-r--r-- | source3/nameelect.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source3/nameelect.c b/source3/nameelect.c index c33206083e..a11d0fb786 100644 --- a/source3/nameelect.c +++ b/source3/nameelect.c @@ -41,7 +41,7 @@ extern pstring scope; extern pstring myname; extern struct in_addr ipzero; -extern struct in_addr ipgrp; +extern struct in_addr wins_ip; /* here are my election parameters */ @@ -71,6 +71,10 @@ void check_master_browser(time_t t) { struct work_record *work; + /* don't do election stuff on the WINS subnet */ + if (ip_equal(d->bcast_ip,wins_ip)) + continue; + for (work = d->workgrouplist; work; work = work->next) { if (!AM_MASTER(work)) @@ -116,7 +120,7 @@ void browser_gone(char *work_name, struct in_addr ip) if (!work || !d) return; /* don't do election stuff on the WINS subnet */ - if (ip_equal(d->bcast_ip,ipgrp)) + if (ip_equal(d->bcast_ip,wins_ip)) return; if (strequal(work->work_group, lp_workgroup())) @@ -350,6 +354,9 @@ void become_local_master(struct subnet_record *d, struct work_record *work) /* update our server status */ work->ServerType |= SV_TYPE_MASTER_BROWSER; + + DEBUG(3,("become_local_master: updating our server %s to type %x\n", myname, work->ServerType)); + add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True); if (work->serverlist == NULL) /* no servers! */ @@ -638,6 +645,14 @@ void run_elections(time_t t) for (d = subnetlist; d; d = d->next) { struct work_record *work; + + if(ip_equal(d->bcast_ip, wins_ip)) + { + /* WINS ip */ + DEBUG(10,("run_elections: ignoring WINS subnet\n")); + continue; + } + for (work = d->workgrouplist; work; work = work->next) { if (work->RunningElection) @@ -710,7 +725,7 @@ void process_election(struct packet_struct *p,char *buf) if (!d) return; - if (ip_equal(d->bcast_ip,ipgrp)) { + if (ip_equal(d->bcast_ip,wins_ip)) { DEBUG(3,("Unexpected election request from %s %s on WINS net\n", name, inet_ntoa(p->ip))); return; |