summaryrefslogtreecommitdiffstats
path: root/source3/nameserv.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-04-09 01:19:25 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-04-09 01:19:25 +0000
commit20b5dea237916902437ce3dcdb7c253fd1ad3585 (patch)
treee68a033a708efed2c93c95a73da978ebf9221c34 /source3/nameserv.c
parent02e610b927c9038cf498f726d807ee95a14714be (diff)
downloadsamba-20b5dea237916902437ce3dcdb7c253fd1ad3585.tar.gz
samba-20b5dea237916902437ce3dcdb7c253fd1ad3585.tar.xz
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/nameserv.c')
-rw-r--r--source3/nameserv.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/source3/nameserv.c b/source3/nameserv.c
index 77c39062422..ac2dac1683c 100644
--- a/source3/nameserv.c
+++ b/source3/nameserv.c
@@ -38,7 +38,7 @@ extern int DEBUGLEVEL;
extern pstring scope;
extern pstring myname;
extern struct in_addr ipzero;
-extern struct in_addr ipgrp;
+extern struct in_addr wins_ip;
extern struct subnet_record *subnetlist;
@@ -80,7 +80,7 @@ void remove_name_entry(struct subnet_record *d, char *name,int type)
don't really own */
remove_netbios_name(d,name,type,SELF,n2->ip_flgs[0].ip);
- if (ip_equal(d->bcast_ip, ipgrp))
+ if (ip_equal(d->bcast_ip, wins_ip))
{
if (!lp_wins_support())
{
@@ -125,7 +125,7 @@ void add_my_name_entry(struct subnet_record *d,char *name,int type,int nb_flags)
name entry to a local-subnet name database. see rfc1001.txt 15.1.1 p28
regarding the point about M-nodes. */
- if (ip_equal(d->bcast_ip, ipgrp))
+ if (ip_equal(d->bcast_ip, wins_ip))
{
if (lp_wins_support())
{
@@ -194,10 +194,16 @@ void add_domain_names(time_t t)
if (lp_domain_master() && work && work->dom_state == DOMAIN_NONE)
{
+
+ DEBUG(0,("add_domain_names:Checking for domain master on workgroup %s\n", lp_workgroup()));
+
make_nmb_name(&n,lp_workgroup(),0x1b,scope);
if (!find_name(d->namelist, &n, FIND_SELF))
{
- if (ip_equal(d->bcast_ip,ipgrp))
+ DEBUG(0,("add_domain_names: attempting to become domain master browser on workgroup %s, bcast %s\n",
+ lp_workgroup(), inet_ntoa(d->bcast_ip)));
+
+ if (ip_equal(d->bcast_ip,wins_ip))
{
if (lp_wins_support())
{
@@ -221,6 +227,8 @@ void add_domain_names(time_t t)
NetBIOS name 0x1b.
*/
+ DEBUG(0,("add_domain_names:querying for domain master on workgroup %s\n", lp_workgroup()));
+
queue_netbios_packet(d,ClientNMB,NMB_QUERY,NAME_QUERY_DOMAIN,
lp_workgroup(), 0x1b,
0, 0,0,NULL,NULL,
@@ -246,7 +254,7 @@ void add_my_names(void)
for (d = subnetlist; d; d = d->next)
{
- BOOL wins = lp_wins_support() && ip_equal(d->bcast_ip,ipgrp);
+ BOOL wins = lp_wins_support() && ip_equal(d->bcast_ip,wins_ip);
struct work_record *work = find_workgroupstruct(d, lp_workgroup(), False);
add_my_name_entry(d, myname,0x20,nb_type|NB_ACTIVE);
@@ -339,7 +347,7 @@ void refresh_my_names(time_t t)
void query_refresh_names(time_t t)
{
struct name_record *n;
- struct subnet_record *d = find_subnet(ipgrp);
+ struct subnet_record *d = find_subnet(wins_ip);
static time_t lasttime = 0;