minor patch to allow host announcements to remote subnets
[samba.git] / source3 / namedb.c
index 11eea6976d7ba4a3e920bd5791dc219c09d4a027..ea5b13a80094c9c81d77fc6364a6c9abad3c3331 100644 (file)
@@ -339,6 +339,8 @@ struct work_record *find_workgroupstruct(struct subnet_record *d,
   
   if ((work = make_workgroup(name)))
     {
+      work->needelection = False;
+
       if (lp_preferred_master() &&
          strequal(lp_workgroup(), name) &&
          d->my_interface)
@@ -347,10 +349,6 @@ struct work_record *find_workgroupstruct(struct subnet_record *d,
          work->needelection = True;
          work->ElectionCriterion |= (1<<3);
        }
-      if (!d->my_interface)
-       {
-         work->needelection = False;
-       }
       add_workgroup(work, d);
       return(work);
     }