When MAC address length is zero, assume it is a broadcast. Updated the MS/TP to understand this.

This commit is contained in:
skarg
2014-11-02 05:27:14 +00:00
parent cab93e9db4
commit 3fca74bcfb
9 changed files with 41 additions and 21 deletions
+3 -2
View File
@@ -291,10 +291,11 @@ uint16_t MSTP_Get_Send(
return 0;
}
/* load destination MAC address */
if (Transmit_Packet.address.mac_len == 1) {
/* load destination MAC address */
if (Transmit_Packet.address.mac_len) {
destination = Transmit_Packet.address.mac[0];
} else {
return 0;
destination = MSTP_BROADCAST_ADDRESS;
}
if ((MAX_HEADER + Transmit_Packet.pdu_len) > MAX_MPDU) {
return 0;
+2 -2
View File
@@ -279,10 +279,10 @@ uint16_t MSTP_Get_Send(
return 0;
}
/* load destination MAC address */
if (Transmit_Packet.address.mac_len == 1) {
if (Transmit_Packet.address.mac_len) {
destination = Transmit_Packet.address.mac[0];
} else {
return 0;
destination = MSTP_BROADCAST_ADDRESS;
}
if ((MAX_HEADER + Transmit_Packet.pdu_len) > MAX_MPDU) {
return 0;