zephyr/subsys/net/lib/coap
Benjamin Lindqvist 81ccbd96c9 net: coap: Add internal init function to seed message_id
Randomly generating ID the first time coap_next_id() is called is more
in accordance with CoAP recommendations (see
https://tools.ietf.org/html/draft-ietf-core-coap-18, section 4.4)

"It is strongly recommended that the initial value of the
variable (e.g., on startup) be randomized, in order to make successful
off-path attacks on the protocol less likely."

Doing this in a dedicated init function is the cleanest and most
idiomatic approach. This init function is not exposed publically which
means it will be called only once, by the network stack init procedure.

Signed-off-by: Benjamin Lindqvist <benjamin.lindqvist@endian.se>
2019-10-04 21:22:55 +03:00
..
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
coap_link_format.c cleanup: include/: move misc/printk.h to sys/printk.h 2019-06-27 22:55:49 -04:00
coap.c net: coap: Add internal init function to seed message_id 2019-10-04 21:22:55 +03:00
Kconfig net: coap: Remove legacy CoAP implementation 2019-02-04 16:49:59 -05:00