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 | a82476eee2c521e5eed092bc367da0a7cef23de1 (patch) | |
tree | 36f68ea5347de58b161e6231fa1f0252c246bffc /source/nameelect.c | |
parent | deedac6523cdc435a1a26ad0c13d7a53042aafb6 (diff) | |
download | samba-a82476eee2c521e5eed092bc367da0a7cef23de1.tar.gz samba-a82476eee2c521e5eed092bc367da0a7cef23de1.tar.xz samba-a82476eee2c521e5eed092bc367da0a7cef23de1.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.
Diffstat (limited to 'source/nameelect.c')
-rw-r--r-- | source/nameelect.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source/nameelect.c b/source/nameelect.c index c33206083ec..a11d0fb7867 100644 --- a/source/nameelect.c +++ b/source/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; |