Fix #3452: only alter received packet if port number matches (#3474)

* Use `alterReceivedProtobuf()` for NeighborInfo and Traceroute
`alterReceived()` should never return NULL
Traceroute should be promiscuous

* Remove extensive logging from NeighborInfo module
This commit is contained in:
GUVWAF
2024-03-23 13:31:58 +01:00
committed by GitHub
parent 94e4301f2f
commit d30d6bd3eb
7 changed files with 22 additions and 105 deletions

View File

@@ -9,17 +9,14 @@ class TraceRouteModule : public ProtobufModule<meshtastic_RouteDiscovery>
public:
TraceRouteModule();
// Let FloodingRouter call updateRoute upon rebroadcasting a TraceRoute request
friend class FloodingRouter;
protected:
bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_RouteDiscovery *r) override;
virtual meshtastic_MeshPacket *allocReply() override;
/* Call before rebroadcasting a RouteDiscovery payload in order to update
/* Called before rebroadcasting a RouteDiscovery payload in order to update
the route array containing the IDs of nodes this packet went through */
void updateRoute(meshtastic_MeshPacket *p);
void alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r) override;
private:
// Call to add your ID to the route array of a RouteDiscovery message