summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/nameserv.h10
-rw-r--r--source3/nameannounce.c30
-rw-r--r--source3/namedb.c80
-rw-r--r--source3/nameelect.c30
-rw-r--r--source3/namework.c48
-rw-r--r--source3/nmbd/nmbd.c2
-rw-r--r--source3/nmbsync.c6
7 files changed, 104 insertions, 102 deletions
diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h
index 25934c23f7..8882948ff4 100644
--- a/source3/include/nameserv.h
+++ b/source3/include/nameserv.h
@@ -144,17 +144,19 @@ struct work_record
uint32 ElectionCriterion;
};
-/* a domain structure. it contains a list of workgroups */
-struct domain_record
+/* a subnet structure. it contains a list of workgroups */
+struct subnet_record
{
- struct domain_record *next;
- struct domain_record *prev;
+ struct subnet_record *next;
+ struct subnet_record *prev;
struct work_record *workgrouplist;
struct in_addr bcast_ip;
struct in_addr mask_ip;
struct in_addr myip;
+
+ BOOL my_interface;
};
/* a resource record */
diff --git a/source3/nameannounce.c b/source3/nameannounce.c
index 35247b4d0b..ca2b53297a 100644
--- a/source3/nameannounce.c
+++ b/source3/nameannounce.c
@@ -41,7 +41,7 @@ extern int ClientDGRAM;
extern int ClientNMB;
/* this is our domain/workgroup/server database */
-extern struct domain_record *domainlist;
+extern struct subnet_record *subnetlist;
/* machine comment for host announcements */
extern pstring ServerComment;
@@ -119,7 +119,7 @@ void announce_backup(void)
time_t t = time(NULL);
pstring outbuf;
char *p;
- struct domain_record *d1;
+ struct subnet_record *d1;
int tok;
if (!lastrun) lastrun = t;
@@ -128,10 +128,10 @@ void announce_backup(void)
for (tok = 0; tok <= workgroup_count; tok++)
{
- for (d1 = domainlist; d1; d1 = d1->next)
+ for (d1 = subnetlist; d1; d1 = d1->next)
{
struct work_record *work;
- struct domain_record *d;
+ struct subnet_record *d;
/* search for unique workgroup: only the name matters */
for (work = d1->workgrouplist;
@@ -141,7 +141,7 @@ void announce_backup(void)
if (!work) continue;
/* found one: announce it across all domains */
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
int type=0;
@@ -192,17 +192,17 @@ void announce_host(void)
char *commentp;
pstring comment;
char *my_name;
- struct domain_record *d;
+ struct subnet_record *d;
StrnCpy(comment, *ServerComment ? ServerComment : "NoComment", 43);
my_name = *myname ? myname : "NoName";
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
- if (!ismybcast(d->bcast_ip))
+ if (!d->my_interface)
continue;
for (work = d->workgrouplist; work; work = work->next)
@@ -229,7 +229,7 @@ void announce_host(void)
work->lastannounce_time = t;
- if (!ismybcast(d->bcast_ip)) {
+ if (!d->my_interface) {
stype &= ~(SV_TYPE_POTENTIAL_BROWSER | SV_TYPE_MASTER_BROWSER |
SV_TYPE_DOMAIN_MASTER | SV_TYPE_BACKUP_BROWSER |
SV_TYPE_DOMAIN_CTRL | SV_TYPE_DOMAIN_MEMBER);
@@ -264,7 +264,7 @@ void announce_host(void)
p = p+31;
p = skip_string(p,1);
- if (ismybcast(d->bcast_ip))
+ if (d->my_interface)
{
if (AM_MASTER(work))
{
@@ -338,7 +338,7 @@ void announce_host(void)
**************************************************************************/
void announce_master(void)
{
- struct domain_record *d;
+ struct subnet_record *d;
static time_t last=0;
time_t t = time(NULL);
BOOL am_master = False; /* are we a master of some sort? :-) */
@@ -348,7 +348,7 @@ void announce_master(void)
last = t;
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
for (work = d->workgrouplist; work; work = work->next)
@@ -362,7 +362,7 @@ void announce_master(void)
if (!am_master) return; /* only proceed if we are a master browser */
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
for (work = d->workgrouplist; work; work = work->next)
@@ -394,8 +394,8 @@ void announce_master(void)
}
else
{
- struct domain_record *d2;
- for (d2 = domainlist; d2; d2 = d2->next)
+ struct subnet_record *d2;
+ for (d2 = subnetlist; d2; d2 = d2->next)
{
queue_netbios_packet(ClientNMB,NMB_QUERY,
MASTER_SERVER_CHECK,
diff --git a/source3/namedb.c b/source3/namedb.c
index 81b6c02048..a1ec983237 100644
--- a/source3/namedb.c
+++ b/source3/namedb.c
@@ -44,7 +44,7 @@ extern struct in_addr ipgrp;
struct browse_cache_record *browserlist = NULL;
/* this is our domain/workgroup/server database */
-struct domain_record *domainlist = NULL;
+struct subnet_record *subnetlist = NULL;
static BOOL updatedlists = True;
int updatecount=0;
@@ -61,7 +61,7 @@ int workgroup_count = 0; /* unique index key: one for each workgroup */
/****************************************************************************
add a workgroup into the domain list
**************************************************************************/
-static void add_workgroup(struct work_record *work, struct domain_record *d)
+static void add_workgroup(struct work_record *work, struct subnet_record *d)
{
struct work_record *w2;
@@ -89,7 +89,7 @@ static void add_workgroup(struct work_record *work, struct domain_record *d)
static struct work_record *make_workgroup(char *name)
{
struct work_record *work;
- struct domain_record *d;
+ struct subnet_record *d;
int t = -1;
if (!name || !name[0]) return NULL;
@@ -108,7 +108,7 @@ static struct work_record *make_workgroup(char *name)
/* make sure all token representations of workgroups are unique */
- for (d = domainlist; d && t == -1; d = d->next)
+ for (d = subnetlist; d && t == -1; d = d->next)
{
struct work_record *w;
for (w = d->workgrouplist; w && t == -1; w = w->next)
@@ -177,7 +177,7 @@ static void remove_old_servers(struct work_record *work, time_t t)
/*******************************************************************
remove workgroups
******************************************************************/
-struct work_record *remove_workgroup(struct domain_record *d,
+struct work_record *remove_workgroup(struct subnet_record *d,
struct work_record *work)
{
struct work_record *ret_work = NULL;
@@ -204,19 +204,19 @@ struct work_record *remove_workgroup(struct domain_record *d,
/****************************************************************************
add a domain into the list
**************************************************************************/
-static void add_domain(struct domain_record *d)
+static void add_subnet(struct subnet_record *d)
{
- struct domain_record *d2;
+ struct subnet_record *d2;
- if (!domainlist)
+ if (!subnetlist)
{
- domainlist = d;
+ subnetlist = d;
d->prev = NULL;
d->next = NULL;
return;
}
- for (d2 = domainlist; d2->next; d2 = d2->next);
+ for (d2 = subnetlist; d2->next; d2 = d2->next);
d2->next = d;
d->next = NULL;
@@ -305,7 +305,7 @@ void expire_browse_cache(time_t t)
that it get created/added anyway. this allows us to force entries in
lmhosts file to be added.
**************************************************************************/
-struct work_record *find_workgroupstruct(struct domain_record *d,
+struct work_record *find_workgroupstruct(struct subnet_record *d,
fstring name, BOOL add)
{
struct work_record *ret, *work;
@@ -342,13 +342,13 @@ struct work_record *find_workgroupstruct(struct domain_record *d,
{
if (lp_preferred_master() &&
strequal(lp_workgroup(), name) &&
- ismybcast(d->bcast_ip))
+ d->my_interface)
{
DEBUG(3, ("preferred master startup for %s\n", work->work_group));
work->needelection = True;
work->ElectionCriterion |= (1<<3);
}
- if (!ismybcast(d->bcast_ip))
+ if (!d->my_interface)
{
work->needelection = False;
}
@@ -359,21 +359,19 @@ struct work_record *find_workgroupstruct(struct domain_record *d,
}
/****************************************************************************
- find a domain in the domainlist
+ find a domain in the subnetlist
**************************************************************************/
-struct domain_record *find_domain(struct in_addr source_ip)
+struct subnet_record *find_domain(struct in_addr ip)
{
- struct domain_record *d;
+ struct subnet_record *d;
/* search through domain list for broadcast/netmask that matches
the source ip address */
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
- if (same_net(source_ip, d->bcast_ip, d->mask_ip))
- {
- return(d);
- }
+ if (same_net(ip, d->bcast_ip, d->mask_ip))
+ return(d);
}
return (NULL);
@@ -385,9 +383,9 @@ struct domain_record *find_domain(struct in_addr source_ip)
**************************************************************************/
void dump_workgroups(void)
{
- struct domain_record *d;
+ struct subnet_record *d;
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
if (d->workgrouplist)
{
@@ -416,23 +414,25 @@ void dump_workgroups(void)
/****************************************************************************
create a domain entry
****************************************************************************/
-static struct domain_record *make_domain(struct in_addr ip, struct in_addr mask)
+static struct subnet_record *make_subnet(struct in_addr bcast_ip,
+ struct in_addr mask)
{
- struct domain_record *d;
- d = (struct domain_record *)malloc(sizeof(*d));
+ struct subnet_record *d;
+ d = (struct subnet_record *)malloc(sizeof(*d));
if (!d) return(NULL);
bzero((char *)d,sizeof(*d));
- DEBUG(4, ("making domain %s ", inet_ntoa(ip)));
- DEBUG(4, ("%s\n", inet_ntoa(mask)));
+ DEBUG(4,("making subnet %s ", inet_ntoa(bcast_ip)));
+ DEBUG(4,("%s\n", inet_ntoa(mask)));
- d->bcast_ip = ip;
+ d->bcast_ip = bcast_ip;
d->mask_ip = mask;
d->workgrouplist = NULL;
-
- add_domain(d);
+ d->my_interface = ismybcast(d->bcast_ip);
+
+ add_subnet(d);
return d;
}
@@ -441,11 +441,11 @@ static struct domain_record *make_domain(struct in_addr ip, struct in_addr mask)
add a domain entry. creates a workgroup, if necessary, and adds the domain
to the named a workgroup.
****************************************************************************/
-struct domain_record *add_domain_entry(struct in_addr source_ip,
+struct subnet_record *add_subnet_entry(struct in_addr source_ip,
struct in_addr source_mask,
char *name, BOOL add)
{
- struct domain_record *d;
+ struct subnet_record *d;
struct in_addr ip;
ip = ipgrp;
@@ -455,7 +455,7 @@ struct domain_record *add_domain_entry(struct in_addr source_ip,
/* add the domain into our domain database */
if ((d = find_domain(source_ip)) ||
- (d = make_domain(source_ip, source_mask)))
+ (d = make_subnet(source_ip, source_mask)))
{
struct work_record *w = find_workgroupstruct(d, name, add);
@@ -547,7 +547,7 @@ struct browse_cache_record *add_browser_entry(char *name, int type, char *wg,
/****************************************************************************
add a server entry
****************************************************************************/
-struct server_record *add_server_entry(struct domain_record *d,
+struct server_record *add_server_entry(struct subnet_record *d,
struct work_record *work,
char *name,int servertype,
int ttl,char *comment,
@@ -584,7 +584,7 @@ struct server_record *add_server_entry(struct domain_record *d,
bzero((char *)s,sizeof(*s));
}
- if (ismybcast(d->bcast_ip) &&
+ if (d->my_interface &&
strequal(lp_workgroup(),work->work_group))
{
if (servertype)
@@ -633,7 +633,7 @@ struct server_record *add_server_entry(struct domain_record *d,
******************************************************************/
void write_browse_list(void)
{
- struct domain_record *d;
+ struct subnet_record *d;
pstring fname,fnamenew;
FILE *f;
@@ -661,7 +661,7 @@ void write_browse_list(void)
return;
}
- for (d = domainlist; d ; d = d->next)
+ for (d = subnetlist; d ; d = d->next)
{
struct work_record *work;
for (work = d->workgrouplist; work ; work = work->next)
@@ -706,9 +706,9 @@ void write_browse_list(void)
******************************************************************/
void expire_servers(time_t t)
{
- struct domain_record *d;
+ struct subnet_record *d;
- for (d = domainlist ; d ; d = d->next)
+ for (d = subnetlist ; d ; d = d->next)
{
struct work_record *work;
diff --git a/source3/nameelect.c b/source3/nameelect.c
index 2672bb2ed6..dfb97b6c86 100644
--- a/source3/nameelect.c
+++ b/source3/nameelect.c
@@ -47,7 +47,7 @@ extern time_t StartupTime;
#define BROWSE_MAILSLOT "\\MAILSLOT\\BROWSE"
-extern struct domain_record *domainlist;
+extern struct subnet_record *subnetlist;
/*******************************************************************
@@ -57,7 +57,7 @@ void check_master_browser(void)
{
static time_t lastrun=0;
time_t t = time(NULL);
- struct domain_record *d;
+ struct subnet_record *d;
if (!lastrun) lastrun = t;
if (t < lastrun + CHECK_TIME_MST_BROWSE * 60)
@@ -67,7 +67,7 @@ void check_master_browser(void)
dump_workgroups();
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
@@ -92,13 +92,13 @@ void check_master_browser(void)
******************************************************************/
void browser_gone(char *work_name, struct in_addr ip)
{
- struct domain_record *d = find_domain(ip);
+ struct subnet_record *d = find_domain(ip);
struct work_record *work = find_workgroupstruct(d, work_name, False);
if (!work || !d) return;
if (strequal(work->work_group, lp_workgroup()) &&
- ismybcast(d->bcast_ip))
+ d->my_interface)
{
DEBUG(2,("Forcing election on %s %s\n",
@@ -125,7 +125,7 @@ void browser_gone(char *work_name, struct in_addr ip)
/****************************************************************************
send an election packet
**************************************************************************/
-void send_election(struct domain_record *d, char *group,uint32 criterion,
+void send_election(struct subnet_record *d, char *group,uint32 criterion,
int timeup,char *name)
{
pstring outbuf;
@@ -157,7 +157,7 @@ void send_election(struct domain_record *d, char *group,uint32 criterion,
/*******************************************************************
become the master browser
******************************************************************/
-static void become_master(struct domain_record *d, struct work_record *work)
+static void become_master(struct subnet_record *d, struct work_record *work)
{
uint32 domain_type = SV_TYPE_DOMAIN_ENUM | SV_TYPE_SERVER_UNIX | 0x00400000;
@@ -192,7 +192,7 @@ static void become_master(struct domain_record *d, struct work_record *work)
add_server_entry(d,work,work->work_group,domain_type,0,myname,True);
add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
- if (ismybcast(d->bcast_ip))
+ if (d->my_interface)
{
/* ask all servers on our local net to announce to us */
announce_request(work, d->bcast_ip);
@@ -203,7 +203,7 @@ static void become_master(struct domain_record *d, struct work_record *work)
/*******************************************************************
unbecome the master browser
******************************************************************/
-void become_nonmaster(struct domain_record *d, struct work_record *work)
+void become_nonmaster(struct subnet_record *d, struct work_record *work)
{
DEBUG(2,("Becoming non-master for %s\n",work->work_group));
@@ -227,14 +227,14 @@ void run_elections(void)
time_t t = time(NULL);
static time_t lastime = 0;
- struct domain_record *d;
+ struct subnet_record *d;
/* send election packets once a second */
if (lastime && t-lastime <= 0) return;
lastime = t;
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
for (work = d->workgrouplist; work; work = work->next)
@@ -293,7 +293,7 @@ void process_election(struct packet_struct *p,char *buf)
{
struct dgram_packet *dgram = &p->packet.dgram;
struct in_addr ip = dgram->header.source_ip;
- struct domain_record *d = find_domain(ip);
+ struct subnet_record *d = find_domain(ip);
int version = CVAL(buf,0);
uint32 criterion = IVAL(buf,1);
int timeup = IVAL(buf,5)/1000;
@@ -313,7 +313,7 @@ void process_election(struct packet_struct *p,char *buf)
{
if (listening_name(work, &dgram->dest_name) &&
strequal(work->work_group, lp_workgroup()) &&
- ismybcast(d->bcast_ip))
+ d->my_interface)
{
if (win_election(work, version,criterion,timeup,name))
{
@@ -350,10 +350,10 @@ void process_election(struct packet_struct *p,char *buf)
***************************************************************************/
BOOL check_elections(void)
{
- struct domain_record *d;
+ struct subnet_record *d;
BOOL run_any_election = False;
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
for (work = d->workgrouplist; work; work = work->next)
diff --git a/source3/namework.c b/source3/namework.c
index 7764653968..a34d9e25a0 100644
--- a/source3/namework.c
+++ b/source3/namework.c
@@ -50,7 +50,7 @@ extern int workgroup_count; /* total number of workgroups we know about */
extern struct browse_cache_record *browserlist;
/* this is our domain/workgroup/server database */
-extern struct domain_record *domainlist;
+extern struct subnet_record *subnetlist;
/* machine comment for host announcements */
extern pstring ServerComment;
@@ -107,8 +107,8 @@ tell a server to become a backup browser
**************************************************************************/
void tell_become_backup(void)
{
- struct domain_record *d;
- for (d = domainlist; d; d = d->next)
+ struct subnet_record *d;
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
for (work = d->workgrouplist; work; work = work->next)
@@ -161,7 +161,7 @@ find a server responsible for a workgroup, and sync browse lists
**************************************************************************/
static BOOL sync_browse_entry(struct browse_cache_record *b)
{
- struct domain_record *d;
+ struct subnet_record *d;
struct work_record *work;
/*
if (!strequal(serv_name, b->name))
@@ -245,13 +245,13 @@ void update_from_reg(char *name, int type, struct in_addr ip)
if (type >= 0x1b && type <= 0x1e)
{
struct work_record *work;
- struct domain_record *d;
+ struct subnet_record *d;
if (!(d = find_domain(ip))) return;
if (!(work = find_workgroupstruct(d, name, False))) return;
/* request the server to announce if on our subnet */
- if (ismybcast(d->bcast_ip)) announce_request(work, ip);
+ if (d->my_interface) announce_request(work, ip);
/* domain master type or master browser type */
if (type == 0x1b || type == 0x1d)
@@ -280,7 +280,7 @@ void add_my_domains(char *group)
for (i=0;i<n;i++) {
ip = iface_n_ip(i);
if (!ip) return;
- add_domain_entry(*iface_bcast(*ip),*iface_nmask(*ip),lp_workgroup(),True);
+ add_subnet_entry(*iface_bcast(*ip),*iface_nmask(*ip),lp_workgroup(),True);
}
}
@@ -292,7 +292,7 @@ static void send_backup_list(char *work_name, struct nmb_name *src_name,
int info_count, int token, int info,
int name_type, struct in_addr ip)
{
- struct domain_record *d;
+ struct subnet_record *d;
char outbuf[1024];
char *p, *countptr, *nameptr;
int count = 0;
@@ -331,7 +331,7 @@ static void send_backup_list(char *work_name, struct nmb_name *src_name,
nameptr = p;
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
@@ -465,7 +465,7 @@ static void process_announce(struct packet_struct *p,int command,char *buf)
{
struct dgram_packet *dgram = &p->packet.dgram;
struct in_addr ip = dgram->header.source_ip;
- struct domain_record *d = find_domain(ip);
+ struct subnet_record *d = find_domain(ip);
int update_count = CVAL(buf,0);
int ttl = IVAL(buf,1)/1000;
char *name = buf+5;
@@ -546,8 +546,8 @@ static void process_master_announce(struct packet_struct *p,char *buf)
{
struct dgram_packet *dgram = &p->packet.dgram;
struct in_addr ip = dgram->header.source_ip;
- struct domain_record *d = find_domain(ip);
- struct domain_record *mydomain = find_domain(*iface_bcast(ip));
+ struct subnet_record *d = find_domain(ip);
+ struct subnet_record *mydomain = find_domain(*iface_bcast(ip));
char *name = buf;
struct work_record *work;
name[15] = 0;
@@ -597,7 +597,7 @@ static void process_rcv_backup_list(struct packet_struct *p,char *buf)
for (buf1 = buf+5; *buf1 && count; buf1 = skip_string(buf1, 1), --count)
{
struct in_addr back_ip;
- struct domain_record *d;
+ struct subnet_record *d;
DEBUG(4,("Searching for backup browser %s at %s...\n",
buf1, inet_ntoa(ip)));
@@ -616,8 +616,8 @@ static void process_rcv_backup_list(struct packet_struct *p,char *buf)
if ((d = find_domain(back_ip)))
{
- struct domain_record *d1;
- for (d1 = domainlist; d1; d1 = d1->next)
+ struct subnet_record *d1;
+ for (d1 = subnetlist; d1; d1 = d1->next)
{
struct work_record *work;
for (work = d1->workgrouplist; work; work = work->next)
@@ -651,7 +651,7 @@ static void process_send_backup_list(struct packet_struct *p,char *buf)
{
struct dgram_packet *dgram = &p->packet.dgram;
struct in_addr ip = dgram->header.source_ip;
- struct domain_record *d;
+ struct subnet_record *d;
struct work_record *work;
int count = CVAL(buf,0);
@@ -669,7 +669,7 @@ static void process_send_backup_list(struct packet_struct *p,char *buf)
return;
}
- for (d = domainlist; d; d = d->next)
+ for (d = subnetlist; d; d = d->next)
{
for (work = d->workgrouplist; work; work = work->next)
{
@@ -707,8 +707,8 @@ static void process_reset_browser(struct packet_struct *p,char *buf)
/* stop being a master but still deal with being a backup browser */
if (state & 0x1)
{
- struct domain_record *d;
- for (d = domainlist; d; d = d->next)
+ struct subnet_record *d;
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
for (work = d->workgrouplist; work; work = work->next)
@@ -724,8 +724,8 @@ static void process_reset_browser(struct packet_struct *p,char *buf)
/* totally delete all servers and start afresh */
if (state & 0x2)
{
- struct domain_record *d;
- for (d = domainlist; d; d = d->next)
+ struct subnet_record *d;
+ for (d = subnetlist; d; d = d->next)
{
struct work_record *work;
for (work=d->workgrouplist;work;work=remove_workgroup(d,work));
@@ -752,7 +752,7 @@ static void process_announce_request(struct packet_struct *p,char *buf)
struct dgram_packet *dgram = &p->packet.dgram;
struct work_record *work;
struct in_addr ip = dgram->header.source_ip;
- struct domain_record *d = find_domain(ip);
+ struct subnet_record *d = find_domain(ip);
int token = CVAL(buf,0);
char *name = buf+1;
@@ -765,7 +765,7 @@ static void process_announce_request(struct packet_struct *p,char *buf)
if (!d) return;
- if (!ismybcast(d->bcast_ip)) return;
+ if (!d->my_interface) return;
for (work = d->workgrouplist; work; work = work->next)
{
@@ -784,7 +784,7 @@ void process_logon_packet(struct packet_struct *p,char *buf,int len)
{
struct dgram_packet *dgram = &p->packet.dgram;
struct in_addr ip = dgram->header.source_ip;
- struct domain_record *d = find_domain(ip);
+ struct subnet_record *d = find_domain(ip);
char *logname,*q;
char *reply_name;
BOOL add_slashes = False;
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 414ad41b63..87a545aa1c 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -287,7 +287,7 @@ static void load_hosts_file(char *fname)
ipmask = *iface_nmask(ipaddr);
if (group) {
- add_domain_entry(ipaddr, ipmask, name, True);
+ add_subnet_entry(ipaddr, ipmask, name, True);
} else {
add_netbios_entry(name,0x20,NB_ACTIVE,0,source,ipaddr,True);
}
diff --git a/source3/nmbsync.c b/source3/nmbsync.c
index c9e0dfc462..44698762d4 100644
--- a/source3/nmbsync.c
+++ b/source3/nmbsync.c
@@ -55,7 +55,7 @@ char *getsmbpass(char *pass)
/****************************************************************************
adds information retrieved from a NetServerEnum call
****************************************************************************/
-static BOOL add_info(struct domain_record *d, struct work_record *work, int servertype)
+static BOOL add_info(struct subnet_record *d, struct work_record *work, int servertype)
{
char *rparam = NULL;
char *rdata = NULL;
@@ -112,7 +112,7 @@ static BOOL add_info(struct domain_record *d, struct work_record *work, int serv
/* creates workgroup on remote subnet */
if ((w = find_workgroupstruct(d,sname, True)))
{
- if (ismybcast(d->bcast_ip))
+ if (d->my_interface)
{
announce_request(w, d->bcast_ip);
}
@@ -141,7 +141,7 @@ static BOOL add_info(struct domain_record *d, struct work_record *work, int serv
void sync_browse_lists(struct work_record *work, char *name, int nm_type,
struct in_addr ip)
{
- struct domain_record *d;
+ struct subnet_record *d;
pid = getpid();
uid = getuid();
gid = getgid();