removed the remote interfaces stuff.
authorAndrew Tridgell <tridge@samba.org>
Mon, 22 Jul 1996 14:32:38 +0000 (14:32 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 22 Jul 1996 14:32:38 +0000 (14:32 +0000)
(This used to be commit 51e5a1a546adf6ba36c7e4c3298c651cff7e15b9)

12 files changed:
source3/include/nameserv.h
source3/include/proto.h
source3/lib/interface.c
source3/nameannounce.c
source3/namedbserver.c
source3/namedbsubnet.c
source3/namedbwork.c
source3/nameelect.c
source3/nameserv.c
source3/namework.c
source3/nmbsync.c
source3/param/loadparm.c

index b634250c8116bf8f0dc840d7da2f7d09e877110c..7a97097e78ed36b3fb5494946bc5a32f0ffa3560 100644 (file)
@@ -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 */
index 66c21ebfafb5c432344206cd90f9a3927ecf508d..1f3a251fec518d991f2d443d131c1ddefbc44a7b 100644 (file)
@@ -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);
index 40fcdfa6e21ec2c14b66cd481f201e58f328391c..3a532140b396fd1ae062d62897448bcb509d3a31 100644 (file)
@@ -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");
 }
 
 
index 3107d02c1498da6dc93f884ad61db4898150c216..4801f9e0bd213f6e06a3915649d46158a8803fad 100644 (file)
@@ -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)) { 
index f695644129209631cdc50690d19f9f3221322dec..afb1dc1431550d80503ad30b37d2934b16622e59 100644 (file)
@@ -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;
index c78307f66650ac6cf85f8d9acc9685aa99dc662c..a259f25393ada1b82d4ac03cf1cdac536accc315 100644 (file)
@@ -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",
index 88f66a7b156e7946b2de293056d0155ed708a214..13dde54b2274b5ee2f5c02caa36c4cede868f885 100644 (file)
@@ -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);
     }
index 2b0fa5c0dd05725e6bc2fea5fd141239f3ee2849..1095f8a7fad2aa7c3da9e727f31aebf78d310fb1 100644 (file)
@@ -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);
-
-     /* 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);
   }
 }
 
@@ -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))
            {
index ee75a9825a345676811b9962ffde09d3552823c8..93cc59741534e4fe51ca1f90c6929e9dc2151cae 100644 (file)
@@ -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);
index fbdba6c68c3599a8b88d9ccfba60f2ef48dab0b6..1a7a48aa9a74f08d8308fc43bb808701b645da17 100644 (file)
@@ -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,
index dd1b8bac0da53ea382d36f8ce9f4a75076c24992..de3d9e873316a6ee45e0edeaca181c1dc8fb54b2 100644 (file)
@@ -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);
                    }
                }
              
index 48b9d062e86052bb0b232bce26196be92b51a72b..f4aaa16e6a4eeaca7dd6980dae8ce02a87e33756 100644 (file)
@@ -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)