struct in_addr bcast_ip;
struct in_addr mask_ip;
struct in_addr myip;
-
- BOOL my_interface;
};
/* a resource record */
char *lp_logon_script(void);
char *lp_wins_server(void);
char *lp_interfaces(void);
-char *lp_remote_interfaces(void);
BOOL lp_wins_support(void);
BOOL lp_wins_proxy(void);
BOOL lp_domain_master(void);
static BOOL got_nmask=False;
struct interface *local_interfaces = NULL;
-struct interface *remote_interfaces = NULL;
struct interface *last_iface;
void load_interfaces(void)
{
/* add the machine's interfaces to local interface structure*/
- interpret_interfaces(lp_interfaces (), &local_interfaces,
- "interface");
-
- /* add all subnets to remote interfaces structure */
- interpret_interfaces(lp_remote_interfaces(), &remote_interfaces,
- "remote subnet");
+ interpret_interfaces(lp_interfaces(), &local_interfaces,"interface");
}
work->lastannounce_time = t;
+ /*
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);
}
+ */
for (s = work->serverlist; s; s = s->next) {
if (strequal(myname, s->serv.name)) {
}
- if (d->my_interface && strequal(lp_workgroup(),work->work_group))
+ if (strequal(lp_workgroup(),work->work_group))
{
if (servertype)
servertype |= SV_TYPE_LOCAL_LIST_ONLY;
/* local interfaces structure */
extern struct interface *local_interfaces;
-/* remote interfaces structure */
-extern struct interface *remote_interfaces;
-
/* this is our domain/workgroup/server database */
struct subnet_record *subnetlist = NULL;
d->bcast_ip = bcast_ip;
d->mask_ip = mask_ip;
d->workgrouplist = NULL;
- d->my_interface = False; /* True iff the interface is on the samba host */
add_subnet(d);
/****************************************************************************
- add the remote interfaces from lp_remote_interfaces() and lp_interfaces()
+ add the remote interfaces from lp_interfaces()
to the netbios subnet database.
****************************************************************************/
void add_subnet_interfaces(void)
/* add the interface into our subnet database */
if (!find_subnet(i->bcast))
{
- struct subnet_record *d = make_subnet(i->bcast,i->nmask);
- if (d)
- {
- /* short-cut method to identifying local interfaces */
- d->my_interface = True;
- }
- }
- }
-
- /* loop on all remote interfaces */
- for (i = remote_interfaces; i; i = i->next)
- {
- /* add the interface into our subnet database */
- if (!find_subnet(i->bcast))
- {
- make_subnet(i->bcast,i->nmask);
+ make_subnet(i->bcast,i->nmask);
}
}
/* add WORKGROUP(1e) and WORKGROUP(00) entries into name database
or register with WINS server, if it's our workgroup */
- if (strequal(lp_workgroup(), name) && d->my_interface)
+ if (strequal(lp_workgroup(), name))
{
add_my_name_entry(d,name,0x1e,NB_ACTIVE|NB_GROUP);
add_my_name_entry(d,name,0x0 ,NB_ACTIVE|NB_GROUP);
}
/* add samba server name to workgroup list. don't add
lmhosts server entries to local interfaces */
- if ((strequal(lp_workgroup(), name) && d->my_interface) ||
- (lmhosts && !d->my_interface))
+ if (strequal(lp_workgroup(), name))
{
add_server_entry(d,w,myname,w->ServerType,0,ServerComment,True);
DEBUG(3,("Added server name entry %s at %s\n",
if ((work = make_workgroup(name)))
{
if (lp_preferred_master() &&
- strequal(lp_workgroup(), name) &&
- d->my_interface)
+ strequal(lp_workgroup(), name))
{
DEBUG(3, ("preferred master startup for %s\n", work->work_group));
work->needelection = True;
work->ElectionCriterion |= (1<<3);
}
- if (!d->my_interface)
- {
- work->needelection = False;
- }
add_workgroup(work, d);
return(work);
}
/* i don't know about this workgroup, therefore i don't care */
if (!work || !d) return;
- if (strequal(work->work_group, lp_workgroup()) && d->my_interface)
+ if (strequal(work->work_group, lp_workgroup()))
{
DEBUG(2,("Forcing election on %s %s\n",
else
{
/* local interfaces: force an election */
- if (d->my_interface)
- send_election(d, work->work_group, 0, 0, myname);
-
- /* only removes workgroup completely on a local interface or
- if there are no server entries on the remote interface.
- (persistent lmhost entries on a remote interface will stop
- the workgroup being removed. persistent lmhosts entries on
- a local interface _will_ be removed).
+ send_election(d, work->work_group, 0, 0, myname);
+
+ /* only removes workgroup completely on a local interface
+ persistent lmhosts entries on a local interface _will_ be removed).
*/
- remove_workgroup(d, work, d->my_interface);
+ remove_workgroup(d, work,True);
}
}
work->ServerType |= SV_TYPE_MASTER_BROWSER;
add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
- if (d->my_interface && work->serverlist == NULL) /* no servers! */
+ if (work->serverlist == NULL) /* no servers! */
{
/* ask all servers on our local net to announce to us */
announce_request(work, d->bcast_ip);
for (work = d->workgrouplist; work; work = work->next)
{
if (listening_name(work, &dgram->dest_name) &&
- strequal(work->work_group, lp_workgroup()) &&
- d->my_interface)
+ strequal(work->work_group, lp_workgroup()))
{
if (win_election(work, version,criterion,timeup,name))
{
{
BOOL wins_iface = ip_equal(d->bcast_ip, ipgrp);
- if (!d->my_interface && !wins_iface) continue;
-
add_my_name_entry(d, myname,0x20,NB_ACTIVE);
add_my_name_entry(d, myname,0x03,NB_ACTIVE);
add_my_name_entry(d, myname,0x00,NB_ACTIVE);
if (!d) return;
- if (!d->my_interface) return;
-
for (work = d->workgrouplist; work; work = work->next)
{
/* XXXX BUG: the destination name type should also be checked,
/* creates workgroup on remote subnet */
if ((w = find_workgroupstruct(d,sname,True)))
{
- if (d->my_interface)
- {
- announce_request(w, d->bcast_ip);
- }
+ announce_request(w, d->bcast_ip);
}
}
char *szSmbrun;
char *szWINSserver;
char *szInterfaces;
- char *szRemoteInterfaces;
int max_log_size;
int mangled_stack;
int max_xmit;
{"null passwords", P_BOOL, P_GLOBAL, &Globals.bNullPasswords, NULL},
{"strip dot", P_BOOL, P_GLOBAL, &Globals.bStripDot, NULL},
{"interfaces", P_STRING, P_GLOBAL, &Globals.szInterfaces, NULL},
- {"remote interfaces",P_STRING, P_GLOBAL, &Globals.szRemoteInterfaces,NULL},
{"password server", P_STRING, P_GLOBAL, &Globals.szPasswordServer, NULL},
{"socket options", P_GSTRING, P_GLOBAL, user_socket_options, NULL},
{"smbrun", P_STRING, P_GLOBAL, &Globals.szSmbrun, NULL},
FN_GLOBAL_STRING(lp_logon_script,&Globals.szLogonScript)
FN_GLOBAL_STRING(lp_wins_server,&Globals.szWINSserver)
FN_GLOBAL_STRING(lp_interfaces,&Globals.szInterfaces)
-FN_GLOBAL_STRING(lp_remote_interfaces,&Globals.szRemoteInterfaces)
FN_GLOBAL_BOOL(lp_wins_support,&Globals.bWINSsupport)
FN_GLOBAL_BOOL(lp_wins_proxy,&Globals.bWINSproxy)