diff --git a/ethermess-backend.c b/ethermess-backend.c index 2e84bae..d9547c3 100644 --- a/ethermess-backend.c +++ b/ethermess-backend.c @@ -835,10 +835,13 @@ void process_frame(void) { return; } + bool broadcast; if (memcmp(frame, own_mac, 6) == 0) { // Targetted at us + broadcast = false; } else if (memcmp(frame, broadcast_mac, 6) == 0) { // Broadcast + broadcast = true; } else { // Does not concern us return; @@ -852,8 +855,11 @@ void process_frame(void) { unsigned char version = frame[14]; // If they speak a version we don't understand, tell them to speak ours + // Exception: If it was a broadcast, just ingore it if (version > EM_PROTOCOL_VERSION) { - send_speak_version(source_mac); + if (!broadcast) { + send_speak_version(source_mac); + } return; } diff --git a/ethermess.7 b/ethermess.7 index 18b3056..359338d 100644 --- a/ethermess.7 +++ b/ethermess.7 @@ -58,6 +58,10 @@ Version 1 EtherMess protocol version Tells the recipient to speak the given version of the protocol. Should be generated whenever an EtherMess packet with a version one doesn't speak is received. +.Pp +Note however that this packet shouldn't be generated if the packet was +sent to the Ethernet broadcast address +.Li ff:ff:ff:ff:ff:ff . .It Status request (0x01) Requests the recipient to announce its status and nick. Upon receiving this packet, a status packet should be sent to the sender.