From: Aji, Srinivas Date: Thu, 10 May 2007 23:35:41 +0000 (-0700) Subject: RSTP testing - PATCH: source MAC address of BPDU X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=905a800c74efa1963e89422cccdad9cca3e2b4ff;p=people%2Fms%2Frstp.git RSTP testing - PATCH: source MAC address of BPDU 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 --- diff --git a/rstplib/transmit.c b/rstplib/transmit.c index 9f0aeaf..bbf0ff0 100644 --- a/rstplib/transmit.c +++ b/rstplib/transmit.c @@ -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) ?