mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-10 01:20:52 +02:00
85e85c1fb4
Under WOLFSSL_RW_THREADED the read and write threads could both perform the lazy isDGramSock() first-time cache write concurrently; the cached bit-fields share a storage unit with other dtlsCtx flags, making this a data race. Instead of caching from inside the I/O callbacks, run the getsockopt(SO_TYPE) probe where dtlsCtx.rfd/wfd is assigned and store the result per descriptor (rfd and wfd may be different sockets of different types). fd assignment happens during single-threaded setup, so no thread-specific handling is needed, and the I/O callbacks reduce to reading a struct member, so isDGramSock() is dropped in favor of reading the flags directly. The stateless-hash test no longer needs to mask the fields: the I/O callbacks no longer write to the WOLFSSL object.
Before creating any new configure files (.conf) read the CONF_FILES_README.md