From: dv1tas Date: Wed, 18 Apr 2012 09:19:21 +0000 (+0000) Subject: Use CIST's infoIs when changing MSTI role for the boundary port X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d3cfad1dfdb849fac94701643f6da4c15dcc01;p=people%2Fms%2Fmstpd.git Use CIST's infoIs when changing MSTI role for the boundary port git-svn-id: svn://svn.code.sf.net/p/mstpd/code/trunk@29 fbe50366-0c72-4402-a84b-5d246361dba7 --- diff --git a/mstp.c b/mstp.c index 25d3065..764253a 100644 --- 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)