mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Merge pull request #231 from xristos-sk/fix-rtl837x_stp-bug,-cmpMac-always-0-when-checking-for-new-root
fix: rtl837x_stp bug, cmpMac always 0 when checking for new root
This commit is contained in:
+1
-1
@@ -136,7 +136,7 @@ void stp_in(void) __banked
|
|||||||
// print_string("Flags: "); print_byte(STP_I->flags); write_char('\n');
|
// print_string("Flags: "); print_byte(STP_I->flags); write_char('\n');
|
||||||
print_string("Check new Root\n");
|
print_string("Check new Root\n");
|
||||||
if (STP_I->root.prio < root_bridge.prio
|
if (STP_I->root.prio < root_bridge.prio
|
||||||
|| ((STP_I->root.prio == root_bridge.prio) && cmpMAC(STP_I->root.mac, STP_I->root.mac) < 0)) {
|
|| ((STP_I->root.prio == root_bridge.prio) && cmpMAC(STP_I->root.mac, root_bridge.mac) < 0)) {
|
||||||
print_string("Updating Root bridge\n");
|
print_string("Updating Root bridge\n");
|
||||||
root_bridge.prio = STP_I->root.prio;
|
root_bridge.prio = STP_I->root.prio;
|
||||||
memcpy(root_bridge.mac, STP_I->root.mac, 6);
|
memcpy(root_bridge.mac, STP_I->root.mac, 6);
|
||||||
|
|||||||
Reference in New Issue
Block a user