TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
973 stars 304 forks source link

Don't disconnect gateway on any parsing error #7145

Closed KrishnaIyer closed 3 months ago

KrishnaIyer commented 3 months ago

Summary

Don't disconnect gateway on any parsing error. Refs: https://github.com/TheThingsIndustries/lorawan-stack-support/issues/1082#issuecomment-2173098782

Changes

Testing

Local TTS.

Steps
  1. Connect an LBS gateway (I'm using wscat to simulate).
  2. Send an JSON message with an invalid MHdr.
    { "DR": 5, "Freq": 868100000, "upinfo": { "rctx": 0, "rxtime": 1718118631, "xtime": 5348025649894907, "gpstime": 1402153849237000, "rssi": -109, "snr": 1.8, "chan": 0 }, "msgtype": "updf", "MHdr": 155, "DevAddr": 843059200, "FCtrl": 22, "FCnt": 0, "FOpts": "1a0400009101", "FPort": -1, "FRMPayload": "", "MIC": 401, "RefTime": 1718118631.2550001 }
Results

Before:

After:

Regressions

Don't expect any, This itself is a fix for a regression.

Checklist