kern/93909: STP doesn't transmit its own bridge id
Onno Molenkamp
onno at flox.org
Mon Feb 27 10:50:22 PST 2006
>Number: 93909
>Category: kern
>Synopsis: STP doesn't transmit its own bridge id
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 27 18:50:06 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Onno Molenkamp
>Release: 6.0-STABLE
>Organization:
>Environment:
FreeBSD duiveltje 6.0-STABLE FreeBSD 6.0-STABLE #0: Mon Jan 16 13:54:19 CET 2006 root at duiveltje:/usr/obj/usr/src/sys/DUIVELTJE i386
>Description:
The code in net/bridgestp.c that builds up a packet to be transmitted over the network incorrectly puts the root id in the bridge id field.
I noticed this behaviour in 6.0-STABLE version from a while ago, but the bug still exists in current CVS.
>How-To-Repeat:
Use an if_bridge bridge with STP.
>Fix:
--- net/bridgestp.c Tue Jan 10 00:53:40 2006
+++ net/bridgestp.c.new Mon Feb 27 19:42:24 2006
@@ -269,13 +269,13 @@
bpdu.cbu_rootpathcost = htonl(cu->cu_root_path_cost);
- bpdu.cbu_bridgepri = htons(cu->cu_rootid >> 48);
- bpdu.cbu_bridgeaddr[0] = cu->cu_rootid >> 40;
- bpdu.cbu_bridgeaddr[1] = cu->cu_rootid >> 32;
- bpdu.cbu_bridgeaddr[2] = cu->cu_rootid >> 24;
- bpdu.cbu_bridgeaddr[3] = cu->cu_rootid >> 16;
- bpdu.cbu_bridgeaddr[4] = cu->cu_rootid >> 8;
- bpdu.cbu_bridgeaddr[5] = cu->cu_rootid >> 0;
+ bpdu.cbu_bridgepri = htons(cu->cu_bridge_id >> 48);
+ bpdu.cbu_bridgeaddr[0] = cu->cu_bridge_id >> 40;
+ bpdu.cbu_bridgeaddr[1] = cu->cu_bridge_id >> 32;
+ bpdu.cbu_bridgeaddr[2] = cu->cu_bridge_id >> 24;
+ bpdu.cbu_bridgeaddr[3] = cu->cu_bridge_id >> 16;
+ bpdu.cbu_bridgeaddr[4] = cu->cu_bridge_id >> 8;
+ bpdu.cbu_bridgeaddr[5] = cu->cu_bridge_id >> 0;
bpdu.cbu_portid = htons(cu->cu_port_id);
bpdu.cbu_messageage = htons(cu->cu_message_age);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list