]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
KCC: highlight our deviation from the spec in color_vertices
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 4 Mar 2015 22:46:39 +0000 (11:46 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 28 May 2015 05:25:09 +0000 (07:25 +0200)
The documentation didn't make much sense.

Worked out by Garming.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/bin/samba_kcc

index ab1cafea2083daee92aae0cd3eb4e50aa423f368..0e0275676b23d6644f4ad17c024d297823f235d8 100755 (executable)
@@ -1435,6 +1435,16 @@ class KCC(object):
                 self.keep_connection_list.append(cn)
 
     def add_transports(self, vertex, local_vertex, graph, detect_failed):
+
+        # The docs ([MS-ADTS] 6.2.2.3.4.3) say to use local_vertex
+        # here and in the, but using vertex seems to make more
+        # sense. That is, it wants this:
+        #
+        #bh = self.get_bridgehead(vertex.site, vertex.part, transport,
+        #                         local_vertex.is_black(), detect_failed)
+        #
+        # TODO WHY?????
+
         vertex.accept_red_red = []
         vertex.accept_black = []
         found_failed = False
@@ -1451,9 +1461,6 @@ class KCC(object):
                 continue
 
             partial_replica_okay = vertex.is_black()
-
-            # TODO WHY?????
-            # bh = self.get_bridgehead(local_vertex.site, vertex.part, transport,
             bh = self.get_bridgehead(vertex.site, vertex.part, transport,
                                      partial_replica_okay, detect_failed)
             if bh is None: