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 -3
View File
@@ -1281,10 +1281,10 @@ int dlmstp_send_pdu(
pkt->buffer[i] = pdu[i];
}
pkt->length = pdu_len;
if (dest->mac_len == 0) {
pkt->destination_mac = MSTP_BROADCAST_ADDRESS;
} else {
if (dest && dest->mac_len) {
pkt->destination_mac = dest->mac[0];
} else {
pkt->destination_mac = MSTP_BROADCAST_ADDRESS;
}
bytes_sent = pdu_len;
}