From 6b97358c8718b6e4851ed80f942ce5f2c72d4160 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sat, 23 Mar 2024 17:33:59 +0100 Subject: [PATCH] Set unused header bytes to zero for future use --- src/mesh/RadioInterface.cpp | 2 ++ src/mesh/RadioInterface.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 859e7bea41..3aac9dfcec 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -564,6 +564,8 @@ size_t RadioInterface::beginSending(meshtastic_MeshPacket *p) h->to = p->to; h->id = p->id; h->channel = p->channel; + h->next_hop = 0; // *** For future use *** + h->relay_node = 0; // *** For future use *** if (p->hop_limit > HOP_MAX) { LOG_WARN("hop limit %d is too high, setting to %d\n", p->hop_limit, HOP_RELIABLE); p->hop_limit = HOP_RELIABLE; diff --git a/src/mesh/RadioInterface.h b/src/mesh/RadioInterface.h index ee4726d745..b965328e46 100644 --- a/src/mesh/RadioInterface.h +++ b/src/mesh/RadioInterface.h @@ -34,6 +34,12 @@ typedef struct { /** The channel hash - used as a hint for the decoder to limit which channels we consider */ uint8_t channel; + + // ***For future use*** Last byte of the NodeNum of the next-hop for this packet + uint8_t next_hop; + + // ***For future use*** Last byte of the NodeNum of the node that will relay/relayed this packet + uint8_t relay_node; } PacketHeader; /**