Skip to content

Commit

Permalink
Set unused header bytes to zero for future use (#3479)
Browse files Browse the repository at this point in the history
  • Loading branch information
GUVWAF authored and mverch67 committed Mar 24, 2024
1 parent f2e68af commit 2ae09ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mesh/RadioInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions src/mesh/RadioInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down

0 comments on commit 2ae09ef

Please sign in to comment.