firmware icon indicating copy to clipboard operation
firmware copied to clipboard

[Bug]: Handle obviously malformed messages

Open rainerfritz opened this issue 2 years ago • 0 comments

Category

Other

Hardware

Rak4631

Firmware Version

1.2.59

Description

HopLim80 is not a valid value for example or WantAck8. A handling would be great for such situations. It then triggers "assert failed" which is now handled with rebooting the device (thx for the fix!). Don't know if this comes from a radioIF problem, or an already malformed incoming message. Get such malformed messages filtered after arrive? Nevertheless they should not get queued for sending. Probably rxtime=50 could cause the failure later on?

Relevant log output

05:32:07 74900 [Router] enqueuing for send (id=0x00002ae7 Fr0x04 To0xff, WantAck0, HopLim2 Ch0x1a encrypted rxtime=50)
05:32:07 74900 [Router] txGood=5935,rxGood=9730,rxBad=18
05:32:07 74900 [Router] FIXME-update-db Sniffing packet
05:32:07 74900 [Router] Delivering rx packet (id=0x77c4abf9 Fr0x04 To0xff, WantAck0, HopLim4 Ch0x0 Portnum=4 rxtime=1650951126 rxSNR=-5.75)
05:32:07 74900 [Router] Forwarding to phone (id=0x77c4abf9 Fr0x04 To0xff, WantAck0, HopLim4 Ch0x0 Portnum=4 rxtime=1650951126 rxSNR=-5.75)
05:32:07 74900 [Router] Update DB node 0x4, rx_time=1650951126
05:32:07 74900 [Router] NOTE: tophone queue is full, discarding oldest
05:32:07 74900 [Router] Plugin 'routing' considered
05:32:07 74900 [RadioIf] Starting low level send (id=0x000303f4 Fr0x04 To0xff, WantAck8, HopLim80 Ch0x1a encrypted rxtime=536873474 rxSNR=1.0842e-19)
05:32:07 74900 [RadioIf] assert failed src/mesh/RadioInterface.cpp: 401, size_t RadioInterface::beginSending(MeshPacket*), test=p->hop_limit <= HOP_MAX

rainerfritz avatar Apr 26 '22 09:04 rainerfritz