summaryrefslogtreecommitdiff
path: root/source3/namedbwork.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-08-21 06:09:00 +0000
committerAndrew Tridgell <tridge@samba.org>1996-08-21 06:09:00 +0000
commitb5a64bb74056fad43afedcb05d29000618170ef4 (patch)
tree9373ad05fe68254b02678ebf5ea5e513c39d6226 /source3/namedbwork.c
parenta2fa290188911b1013a8950fe18489038c8fcb05 (diff)
downloadsamba-b5a64bb74056fad43afedcb05d29000618170ef4.tar.gz
samba-b5a64bb74056fad43afedcb05d29000618170ef4.tar.bz2
samba-b5a64bb74056fad43afedcb05d29000618170ef4.zip
- new handling of ST_TYPE bits, they are now consolidated much more in
DFLT_SERVER_TYPE in nameserv.h - got rid of a lot of spurious domain controller stuff. Samba is not a domain controller yet, but it can be a domain master. We were claiming to be a domain controller in some packets which may have caused problems - don't do preferred master startups on the WINS pseudo-net - don't do election requests on the WINS pseudo-net - fix a nasty bug in become_non_master() which wiped out the bits in remove_type before using them. The result was that samba didn't like losing its master status. - changed the logic in the election packet handling to enable us to become a non-master whenever we receive a winning election frame, even if we aren't expecting it - get another packet from the socket in nmbd when we reject one of our own packets, this stops us from going into the packet reading code too often and makes nmbd much snappier - always remove a name immediately when we try to release it, don't wait for the lack of response from the network, otherwise we will end up replying to name that we don't really own. We still send the dereg packets, we just don't wait for them to time out. (This used to be commit eb84f2f342375439d94481a0ccf47c9593544e32)
Diffstat (limited to 'source3/namedbwork.c')
-rw-r--r--source3/namedbwork.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/namedbwork.c b/source3/namedbwork.c
index 200132304b..04f2103254 100644
--- a/source3/namedbwork.c
+++ b/source3/namedbwork.c
@@ -38,13 +38,10 @@ extern int DEBUGLEVEL;
/* this is our domain/workgroup/server database */
extern struct subnet_record *subnetlist;
-int workgroup_count = 0; /* unique index key: one for each workgroup */
+extern struct in_addr ipgrp;
-/* what server type are we currently */
+int workgroup_count = 0; /* unique index key: one for each workgroup */
-#define DFLT_SERVER_TYPE (SV_TYPE_WORKSTATION | SV_TYPE_SERVER | \
- SV_TYPE_TIME_SOURCE | SV_TYPE_SERVER_UNIX | \
- SV_TYPE_PRINTQ_SERVER | SV_TYPE_POTENTIAL_BROWSER)
/****************************************************************************
@@ -89,7 +86,7 @@ static struct work_record *make_workgroup(char *name)
StrnCpy(work->work_group,name,sizeof(work->work_group)-1);
work->serverlist = NULL;
- work->ServerType = DFLT_SERVER_TYPE;
+ work->ServerType = DFLT_SERVER_TYPE | SV_TYPE_POTENTIAL_BROWSER;
work->RunningElection = False;
work->ElectionCount = 0;
work->needelection = False;
@@ -202,7 +199,8 @@ struct work_record *find_workgroupstruct(struct subnet_record *d,
if ((work = make_workgroup(name)))
{
- if (lp_preferred_master() &&
+ if (!ip_equal(d->bcast_ip, ipgrp) &&
+ lp_preferred_master() &&
strequal(lp_workgroup(), name))
{
DEBUG(3, ("preferred master startup for %s\n", work->work_group));