]> git.ipfire.org Git - people/ms/rstp.git/commitdiff
RSTP testing - PATCH: source MAC address of BPDU
authorAji, Srinivas <Aji_Srinivas@emc.com>
Thu, 10 May 2007 23:35:41 +0000 (16:35 -0700)
committerStephen Hemminger <shemminger@linux-foundation.org>
Fri, 11 May 2007 02:34:28 +0000 (19:34 -0700)
   BPDU's were being sent out with an all zero source ethernet
   address. These packets don't make it far in the receive path on
   another bridge since bridge_handle_frame() checks for valid source
   ethernet address and drops them if that isn't the case.

   I needed to undo a change I made in rstplib/transmit.c, where I was
   not setting source MAC address because the LLC layer was doing it.

   TODO: We get notified when a port MAC address changes, so we should
   cache it. Right now it uses SIOCGIFHWADDR each time (for each BPDU
   sent) using a cached name, which is not good.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
rstplib/transmit.c

index 9f0aeaf0d63dcbfb631f995d4975fb2a323e1e7f..bbf0ff00fee56d2f4edc436988330f8d9b72aa0a 100644 (file)
@@ -99,11 +99,7 @@ build_bpdu_header (int port_index,
 {
   unsigned short len8023;
 
-#ifdef ORIG
   STP_OUT_get_port_mac (port_index, bpdu_packet.mac.src_mac);
-#else
-  /* Don't bother. LLC trasmits with correct source MAC, we don't supply it */
-#endif
 
   bpdu_packet.hdr.bpdu_type = bpdu_type;
   bpdu_packet.hdr.version = (BPDU_RSTP == bpdu_type) ?