Skip to content

Commit

Permalink
Fixed broadcast read/write for raw Ethernet
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Kazanzides committed Apr 4, 2024
1 parent a35875a commit 6492ab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/code/EthRawPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ bool EthRawPort::CheckEthernetHeader(const unsigned char *packet, bool useEthern
void EthRawPort::make_ethernet_header(unsigned char *packet, unsigned int numBytes, nodeid_t node, unsigned char flags)
{
memcpy(packet, frame_hdr, ETH_FRAME_LENGTH_OFFSET); // Copy header except length field
if (flags&FW_NODE_ETH_BROADCAST_MASK) { // multicast
if ((flags&FW_NODE_ETH_BROADCAST_MASK) || (!useFwBridge && (node == FW_NODE_BROADCAST))) { // multicast
packet[0] |= 0x01; // set multicast destination address
packet[5] = 0xff; // keep multicast address
}
Expand Down

0 comments on commit 6492ab4

Please sign in to comment.