[riot-notifications] [RIOT-OS/RIOT] net/gcoap: support DTLS (#15549)
notifications at github.com
Thu May 13 21:00:37 CEST 2021
> * Why is there a need for `dtls/dsm` - can't we attach the session directly to the socket?
Like mentioned in one conversation comment, the distribution how the maximum number of sessions `DTLS_PEER_MAX` is distributed to individual sockets is unknown. In some place, currently existing sessions must be held. Keeping actual sessions could of course be done in the implementation of the respective DTLS library. My decision here was to provide a simple generic way to hold sessions without each application/library implementation having to find its own solution.
Additionally, I have a scenario in mind: cross-application session management. Possibly a bit too far thought, but I can definitely see problems if an application can theoretically "occupy" all sessions indefinitely or for a very long time. By this I mean that e.g. `DTLS_PEER_MAX` sessions are occupied by gcoap. As a result, all other applications using DTLS have no possibility to establish connections or to receive incoming connections (kind of resource deadlock) on their sockets.
Right now dsm does not help here, but is very easy to extend to get access to sessions stored by others and close them to free peer resources. Provided dsm is used for storage by the respective applications.
Although I have built in the mechanism with gcoap for this very reason that sessions are automatically freed, but I consider the basic scenario with multiple DTLS applications far from impossible.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications