bridge_identifier_t prevRRootID = tree->rootPriority.RRootID;
__be32 prevExtRootPathCost = tree->rootPriority.ExtRootPathCost;
bool cist = (0 == tree->MSTID);
- times_t *timesOfRootPort;
/* a), b) Select new root priority vector = {rootPriority, rootPortId} */
/* Initial value = bridge priority vector = {BridgePriority, 0} */
/* 802.1q-2005 says, that at some point we need compare portTimes with
* "... one for the Root Port ...". Bad IEEE! Why not mention explicit
* var names??? (see 13.26.23.g) for instance)
- * So, now I should guess what will work for the timesOfRootPort.
- * Below is the result of my guess. I could be wrong, of course:
- * timesOfRootPort = root_ptp ? &root_ptp->portTimes
- * : &tree->BridgeTimes;
+ * These comparisons happen three times, twice in clause g)
+ * and once in clause i). Look for samePriorityAndTimers() calls.
+ * So, now I should guess what will work for the "times for the Root Port".
+ * Thanks to Rajani's experiments I know for sure that I should use
+ * designatedTimes here. Thank you, Rajani!
* NOTE: Both Alex Rozin (author of rstplib) and Srinivas Aji (author
- * of rstpd) compare portTimes with designatedTimes instead of
- * timesOfRootPort. This differs from my interpretation of the standard
- * because designatedTimes have incremented Message_Age (or decremented
- * remainingHops if rcvdInternal).
+ * of rstpd) also compare portTimes with designatedTimes.
*/
/* c) Set new rootTimes */
}
else
++(tree->rootTimes.Message_Age);
- timesOfRootPort = &root_ptp->portTimes;
}
else
{
assign(tree->rootTimes, tree->BridgeTimes);
- timesOfRootPort = &tree->BridgeTimes;
}
FOREACH_PTP_IN_TREE(ptp, tree)
if(!samePriorityAndTimers(&ptp->portPriority,
&ptp->designatedPriority,
&ptp->portTimes,
- timesOfRootPort,
+ &ptp->designatedTimes,
/*cist*/ false))
ptp->updtInfo = true;
continue;
if(!samePriorityAndTimers(&ptp->portPriority,
&ptp->designatedPriority,
&ptp->portTimes,
- timesOfRootPort,
+ &ptp->designatedTimes,
/*cist*/ false))
ptp->updtInfo = true;
continue;
if(!samePriorityAndTimers(&ptp->portPriority,
&ptp->designatedPriority,
&ptp->portTimes,
- timesOfRootPort,
+ &ptp->designatedTimes,
cist))
ptp->updtInfo = true;
continue;