]> git.ipfire.org Git - people/ms/mstpd.git/commitdiff
Fix calculation of root path cost
authordv1tas <dv1tas@fbe50366-0c72-4402-a84b-5d246361dba7>
Wed, 6 Jun 2012 12:08:15 +0000 (12:08 +0000)
committerdv1tas <dv1tas@fbe50366-0c72-4402-a84b-5d246361dba7>
Wed, 6 Jun 2012 12:08:15 +0000 (12:08 +0000)
git-svn-id: svn://svn.code.sf.net/p/mstpd/code/trunk@31 fbe50366-0c72-4402-a84b-5d246361dba7

mstp.c

diff --git a/mstp.c b/mstp.c
index b3d7cdee24e3e0df32cf25ff998728e08748d46f..556923c8b347dda816d38e5555b592cdd2f115aa 100644 (file)
--- a/mstp.c
+++ b/mstp.c
@@ -2269,12 +2269,14 @@ static void updtRolesTree(tree_t *tree)
                                      + ptp->InternalPortPathCost)
                       );
             }
-            else
+            else if(cist) /* Yes, this check might be superfluous,
+                           * but I want to be on the safe side */
             {
                 assign(root_path_priority.ExtRootPathCost,
                        __cpu_to_be32(__be32_to_cpu(root_path_priority.ExtRootPathCost)
                                      + prt->ExternalPortPathCost)
                       );
+                assign(root_path_priority.RRootID, tree->BridgeIdentifier);
                 assign(root_path_priority.IntRootPathCost,
                        __constant_cpu_to_be32(0));
             }