[riot-notifications] [RIOT-OS/RIOT] net/gcoap: add functions to read and set the next message id (#16730)

János Brodbeck notifications at github.com
Sat Aug 14 23:35:26 CEST 2021

I've checked and the `prng_hwrng` module is used. I had also looked at the distribution of the generated message ID after reboots two weeks ago, and that certainly looked random to me and not pseudorandom with a seed.

The message cache also does not hold a number of messages, but for a fixed period of time (server is based on californium). This scenario occurs very, very rarely, but it did happen. We are not even necessarily talking about a high number of messages. Reducing the cache time will probably solve the problem completely (test is already scheduled for next week) for my case, but you have to choose your traffic, cache and reboot timings wisely so that you have no chance for this problem at all.

I don't consider restoring the previous message ID as a workaround. I see this as a complete solution approach, because the probability, as small as it is, is given that after a reboot you get an identical message ID to the last X. And the consequence is that the client in case of CON messages tries the request several times (depending on the number of retransmissions) without success. 

I'll take another look at it, I just don't have the hardware for it right now.

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...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210814/9ca5cbef/attachment-0001.htm>

More information about the notifications mailing list