Closed DanielMaier-BSI closed 6 years ago
Thx to the great works done by @boaks. This should be fixed in this PR #440. A test was added to check that : https://github.com/eclipse/leshan/pull/440/commits/5292951027750e812ecbca36d3b5de2255953c28
Feedback is welcome :)
When a request to a LWM2M client, e.g. read request, gets triggered, Leshan looks up the client with the desired endpoint name from the client registry and sends the request to the IP:Port saved there. When this IP:Port gets used by another client in the meantime, e.g. port re-usage of NAT device, the request gets sent to the wrong client. I think without usage of DTLS this behavior is just fine.
However, the same applies also with DTLS. Example:
One way to solve this would be to handover recipient principal somehow to scandium and scandium only sends the message when this is the same as the active DTLS session. Or even more strict handover the DTLS sessionId etc. of the last message received from the according client to scandium (like Scandium CorrelationContext but only the other way around).
See also mailing list discussion: http://dev.eclipse.org/mhonarc/lists/leshan-dev/msg00610.html