Open mc-hamster opened 2 years ago
The README document says "Packets will be repeated only once per packet ID, to prevent flooding.". I think the old code deliberately didn't decrease the hop counter (Repeater vs. Router behaviour) to act just as a kind of range extender. We need to define what we want it to do exactly from now on. I'd vote vor a Router-light like behaviour, decrementing the packet counter and relaying once.
Ahem ... The 'no repeat' code is very basic. Look for uint32_t lastreceivedID
. It will remember the ONE packet id it last sent out and won't send that out again. If there's another packet in between... 💥 goes the mesh.
Looked over the repeater code. We don’t decrement the hop count nor track which messages we’ve already sent out.
This would lead to circular routing.