summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAji, Srinivas <Aji_Srinivas@emc.com>2007-05-10 16:37:26 -0700
committerStephen Hemminger <shemminger@linux-foundation.org>2007-05-10 19:34:33 -0700
commit40f958aa569b8e7300c8d0fdb0e298d8b4c748c6 (patch)
tree114ac79719319a6cddc0e92ae54e95b17d301bde
parent905a800c74efa1963e89422cccdad9cca3e2b4ff (diff)
downloadrstp-40f958aa569b8e7300c8d0fdb0e298d8b4c748c6.tar.gz
RSTP testing - PATCH: BPDU length calculation
The bpdu_len sent to STP_OUT_tx_bpdu() excludes the ethernet and and LLC headers, though the bpdu pointer points to the start of the ethernet header. Given the types in rstplib/stp_bpdu.h, we need to be sending a packet with (base, len) given by (bpdu, bpdu_len + sizeof(MAC_HEADER_T) + sizeof(ETH_HEADER_T)) MAC_HEADER_T is dest and source ethernet addresses and ETH_HEADER_T is the 802.2 part. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
-rw-r--r--bridge_track.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bridge_track.c b/bridge_track.c
index 67f6252..da53d9b 100644
--- a/bridge_track.c
+++ b/bridge_track.c
@@ -763,8 +763,7 @@ STP_OUT_tx_bpdu(IN int port_index, IN int vlan_id,
TST(vlan_id == 0, 0);
packet_send(port->if_index, bpdu,
- bpdu_len + sizeof(ETH_HEADER_T)
- + sizeof(BPDU_HEADER_T) + sizeof(BPDU_BODY_T));
+ bpdu_len + sizeof(MAC_HEADER_T) + sizeof(ETH_HEADER_T));
return 0;
}