]> git.ipfire.org Git - people/ms/mstpd.git/commitdiff
Use CIST's infoIs when changing MSTI role for the boundary port
authordv1tas <dv1tas@fbe50366-0c72-4402-a84b-5d246361dba7>
Wed, 18 Apr 2012 09:19:21 +0000 (09:19 +0000)
committerdv1tas <dv1tas@fbe50366-0c72-4402-a84b-5d246361dba7>
Wed, 18 Apr 2012 09:19:21 +0000 (09:19 +0000)
git-svn-id: svn://svn.code.sf.net/p/mstpd/code/trunk@29 fbe50366-0c72-4402-a84b-5d246361dba7

mstp.c

diff --git a/mstp.c b/mstp.c
index 25d30653c249a19a9cb93834e97cfeb57eb7e5b8..764253ae5a0a43cd08ffaf2cfcbe231e7cc2dc11 100644 (file)
--- a/mstp.c
+++ b/mstp.c
@@ -2343,6 +2343,7 @@ static void updtRolesTree(tree_t *tree)
     FOREACH_PTP_IN_TREE(ptp, tree)
     {
         port_t *prt = ptp->port;
+        per_tree_port_t *cist_tree = GET_CIST_PTP_FROM_PORT(prt);
 
         /* f) Set Disabled role */
         if(ioDisabled == ptp->infoIs)
@@ -2351,11 +2352,9 @@ static void updtRolesTree(tree_t *tree)
             continue;
         }
 
-        if(!cist && (ioReceived == ptp->infoIs)
-           && !prt->infoInternal)
+        if(!cist && (ioReceived == cist_tree->infoIs) && !prt->infoInternal)
         {
             /* g) Set role for the boundary port in MSTI */
-            per_tree_port_t *cist_tree = GET_CIST_PTP_FROM_PORT(prt);
             if(roleRoot == cist_tree->selectedRole)
             {
                 ptp->selectedRole = roleMaster;
@@ -2379,7 +2378,8 @@ static void updtRolesTree(tree_t *tree)
                 continue;
             }
         }
-        else /* if(cist || (ioReceived != ptp->infoIs) || prt->infoInternal) */
+        else
+     /* if(cist || (ioReceived != cist_tree->infoIs) || prt->infoInternal) */
         {
             /* h) Set role for the aged info */
             if(ioAged == ptp->infoIs)