diff --git a/source/include/nameserv.h b/source/include/nameserv.h index b634250c811..7a97097e78e 100644 --- a/source/include/nameserv.h +++ b/source/include/nameserv.h @@ -251,8 +251,6 @@ struct subnet_record struct in_addr bcast_ip; struct in_addr mask_ip; struct in_addr myip; - - BOOL my_interface; }; /* a resource record */ diff --git a/source/include/proto.h b/source/include/proto.h index 66c21ebfafb..1f3a251fec5 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -142,7 +142,6 @@ char *lp_character_set(void); 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); diff --git a/source/lib/interface.c b/source/lib/interface.c index 40fcdfa6e21..3a532140b39 100644 --- a/source/lib/interface.c +++ b/source/lib/interface.c @@ -33,7 +33,6 @@ static BOOL got_bcast=False; static BOOL got_nmask=False; struct interface *local_interfaces = NULL; -struct interface *remote_interfaces = NULL; struct interface *last_iface; @@ -349,12 +348,7 @@ load the remote and local interfaces 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"); } diff --git a/source/nameannounce.c b/source/nameannounce.c index 3107d02c149..4801f9e0bd2 100644 --- a/source/nameannounce.c +++ b/source/nameannounce.c @@ -394,11 +394,13 @@ void announce_host(void) 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)) { diff --git a/source/namedbserver.c b/source/namedbserver.c index f6956441292..afb1dc14315 100644 --- a/source/namedbserver.c +++ b/source/namedbserver.c @@ -161,7 +161,7 @@ struct server_record *add_server_entry(struct subnet_record *d, } - 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; diff --git a/source/namedbsubnet.c b/source/namedbsubnet.c index c78307f6665..a259f25393a 100644 --- a/source/namedbsubnet.c +++ b/source/namedbsubnet.c @@ -47,9 +47,6 @@ int updatecount = 0; /* 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; @@ -143,7 +140,6 @@ static struct subnet_record *make_subnet(struct in_addr bcast_ip, struct in_addr 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); @@ -152,7 +148,7 @@ static struct subnet_record *make_subnet(struct in_addr bcast_ip, struct in_addr /**************************************************************************** - 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) @@ -165,22 +161,7 @@ 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); } } @@ -248,15 +229,14 @@ struct subnet_record *add_subnet_entry(struct in_addr bcast_ip, /* 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", diff --git a/source/namedbwork.c b/source/namedbwork.c index 88f66a7b156..13dde54b227 100644 --- a/source/namedbwork.c +++ b/source/namedbwork.c @@ -203,17 +203,12 @@ struct work_record *find_workgroupstruct(struct subnet_record *d, 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); } diff --git a/source/nameelect.c b/source/nameelect.c index 2b0fa5c0dd0..1095f8a7fad 100644 --- a/source/nameelect.c +++ b/source/nameelect.c @@ -100,7 +100,7 @@ void browser_gone(char *work_name, struct in_addr ip) /* 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", @@ -112,16 +112,12 @@ void browser_gone(char *work_name, struct in_addr ip) else { /* local interfaces: force an election */ - if (d->my_interface) - send_election(d, work->work_group, 0, 0, myname); + 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). + /* 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); } } @@ -300,7 +296,7 @@ void become_master(struct subnet_record *d, struct work_record *work) 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); @@ -568,8 +564,7 @@ void process_election(struct packet_struct *p,char *buf) 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)) { diff --git a/source/nameserv.c b/source/nameserv.c index ee75a9825a3..93cc5974153 100644 --- a/source/nameserv.c +++ b/source/nameserv.c @@ -186,8 +186,6 @@ void add_my_names(void) { 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); diff --git a/source/namework.c b/source/namework.c index fbdba6c68c3..1a7a48aa9a7 100644 --- a/source/namework.c +++ b/source/namework.c @@ -656,8 +656,6 @@ static void process_announce_request(struct packet_struct *p,char *buf) 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, diff --git a/source/nmbsync.c b/source/nmbsync.c index dd1b8bac0da..de3d9e87331 100644 --- a/source/nmbsync.c +++ b/source/nmbsync.c @@ -112,10 +112,7 @@ static BOOL add_info(struct subnet_record *d, struct work_record *work, int serv /* 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); } } diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 48b9d062e86..f4aaa16e6a4 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -129,7 +129,6 @@ typedef struct char *szSmbrun; char *szWINSserver; char *szInterfaces; - char *szRemoteInterfaces; int max_log_size; int mangled_stack; int max_xmit; @@ -367,7 +366,6 @@ struct parm_struct {"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}, @@ -706,7 +704,6 @@ FN_GLOBAL_STRING(lp_character_set,&Globals.szCharacterSet) 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)